pub fn resolve(
config: &ServerConfig,
headers: &HeaderMap,
) -> Result<Authority, HeaderRejection>Expand description
Resolve authority from headers.
Upstream ordering that matters:
- The appId must match, else
invalidRequest. - Master or maintenance short-circuits, returning before client-key validation
(
middlewares.js:249-251). A request carrying both a master key and a session token is a master request, and the token is not resolved. - Otherwise, if any client key is configured, one must match.