pub async fn auth_middleware(
state: State<AppState>,
request: Request<Body>,
next: Next,
) -> ResponseExpand description
Axum middleware that enforces API key authentication.
Skipped entirely when auth.enabled = false (dev mode).
Returns 401 with a JSON body if the key is missing or invalid.