Expand description
Per-IP rate limiting middleware backed by governor.
Use per_minute to create a limiter, then install the rate_limit
middleware on the desired router group. Rate-limited responses include
X-RateLimit-Limit / Retry-After headers and return HTTP 429 with a
JSON error body.
Structs§
- Rate
Limit State - Shared rate limiter state, injected as an Axum extension.
Functions§
- per_
minute - Build a per-IP rate limiter allowing
requests_per_minuterequests per minute. - rate_
limit - Axum middleware that enforces per-IP rate limiting.