Skip to main content

enforce

Function enforce 

Source
pub async fn enforce(
    __arg0: State<Arc<SidecarGuard>>,
    request: Request,
    next: Next,
) -> Response
Expand description

Outermost middleware of a token-authenticated sidecar.

Checks authority, then Origin, then the token, so a DNS-rebinding page is refused before the token comparison runs. On success the Authorization header is removed so no inner layer, handler, trace or log receives it.