Expand description
§Actix Route Rate Limiter
Actix Route Rate Limiter implements the traits
necessary to create middleware
in the Actix Web framework.
This crate can be used to wrap routes with rate limiting logic by defining a duration and number of requests that will be forwarded during that duration.
If a quantity of requests exceeds this amount, the middleware will short circuit the request
and instead send an HTTP 429 - Too Many Requests response with headers describing the rate limit:
Retry-After: the rate-limiting duration, begins at first request received and ends after this elapsed timeX-RateLimit-Limit: number of requests allowed for the durationX-RateLimit-Remaining: number of requests remaining for current durationX-RateLimit-Reset: number of seconds remaining in the duration