You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Services can declare Hosts and/or PathPrefix alongside x-cratis-microservice (or legacy Service-ID) and ?service= selection. A path prefix takes precedence over explicit service selection, which takes precedence over a host-only route. Prefix API routes target the backend and other prefix routes target the frontend, falling back to the backend when no frontend is configured. StripPathPrefix removes the prefix and announces it in X-Forwarded-Prefix, including on anonymous paths. Set ClientCredentials.RoutePrefix to the external API prefix, such as /reporting/api, for bearer requests under /reporting. Host declarations accept Unicode and punycode names; ambiguous host and prefix declarations are refused at startup. See Routing by host or path prefix. (#150)
Security
With host and path-prefix routing, service-specific claim requirements and client-credentials tokens follow the selected route, and a selected route that cannot be mapped to a configured service is denied rather than checked against proxy-wide requirements only. Host routing distinguishes client-credentials services that share the same token route prefix. (#150)