Skip to main content

public_route_rate_limit_middleware

Function public_route_rate_limit_middleware 

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

Rate-limit public metadata and pre-upgrade routes with one stable bucket.

These routes intentionally have no authenticated subject from which to derive a per-tenant bucket. Forwarding headers are client-controlled at this boundary, so neither X-Forwarded-For nor X-Real-IP may select the bucket. Health probes use a separate, unmetered router.