Skip to main content

resolve

Function resolve 

Source
pub fn resolve(
    config: &ServerConfig,
    headers: &HeaderMap,
) -> Result<Authority, HeaderRejection>
Expand description

Resolve authority from headers.

Upstream ordering that matters:

  1. The appId must match, else invalidRequest.
  2. 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.
  3. Otherwise, if any client key is configured, one must match.