pub async fn rate_limit(
__arg0: State<Arc<ServerState>>,
__arg1: ConnectInfo<SocketAddr>,
limiter: Extension<Arc<AuthRateLimiter>>,
request: Request,
next: Next,
) -> ResponseExpand description
Per-source-IP rate-limit middleware for the /api/v1/auth/*
sub-router. Reads
super::ServerState::auth_rate_limit_per_minute; when None,
the middleware is a no-op (operators rate-limit at the proxy).
When the per-IP request count exceeds the limit, returns
429 Too Many Requests with an ErrorResponse body and a
tracing::warn! event.