rate_limit_middleware

Function rate_limit_middleware 

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

Axum middleware that enforces rate limits.

Skipped entirely when rate_limit.enabled = false (dev mode). Returns 429 with Retry-After header when the limit is exceeded.