Available on crate feature
serve only.Expand description
Bearer-token authentication for /v1/*. Constant-time comparison via
subtle; the Authorization header is the only accepted credential.
Functionsยง
- authorize_
header - Validate a raw
Authorizationheader value against the expected token. - require_
auth - Axum middleware enforcing bearer auth on
/v1/*. A no-op when the server was started with--no-auth. CORS preflight (OPTIONS) is allowed through so browsers (which omitAuthorizationon preflight) work behind a CORS policy.