Repair router frontdoor route boundaries and service prefixes

This commit is contained in:
master
2026-03-10 12:28:48 +02:00
parent 6f808c3b3d
commit 1b6051662f
9 changed files with 223 additions and 5 deletions

View File

@@ -87,6 +87,10 @@ Route types:
Reverse proxy is reserved for external/bootstrap surfaces such as OIDC browser flows, Rekor, and frontdoor static assets. First-party Stella API surfaces are expected to use `Microservice` routing so the gateway remains the single routing authority instead of silently bypassing router registration state.
Regex microservice routes that own a root prefix must use a segment boundary when the same prefix can appear in static asset filenames. The local frontdoor uses `^/policy(?=/|$)(.*)` rather than `^/policy(.*)` so Angular chunks such as `/policy-decisioning.routes-*.js` stay on the SPA/static path instead of being misrouted to the Policy service.
Browser-facing compatibility prefixes that exist only at the frontdoor must strip that prefix before dispatching to the target microservice. Local compose keeps `/doctor/api/v1/doctor/*` and `/scheduler/api/v1/scheduler/*` for the shell, but the route table translates them to `http://doctor.stella-ops.local$1` and `http://scheduler.stella-ops.local$1` so the backend still receives its canonical `/api/v1/<service>/*` path.
### Pipeline Order
System paths (`/health`, `/metrics`, `/openapi.*`) bypass the route table entirely. The dispatch middleware runs before the microservice pipeline: