Skip to main content

auth

Function auth 

Source
pub async fn auth(__arg0: State<AppState>, req: Request, next: Next) -> Response
Expand description

Bearer token auth middleware. If config.api_key is non-empty, validates Authorization: Bearer <key>. If api_key is empty, all requests are allowed through.