docs.rs failed to build actix-extensible-rate-limit-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
actix-extensible-rate-limit-0.4.0
Actix Extensible Rate Limit
An attempt at a more flexible rate limiting middleware for actix-web
Allows for:
- Deriving a custom rate limit key from the request context.
- Using dynamic rate limits and intervals determined by the request context.
- Using custom backends (store & algorithm)
- Setting a custom 429 response.
- Transforming the response headers based on rate limit results (e.g
x-ratelimit-remaining). - Rolling back rate limit counts based on response codes.
Provided Backends
| Backend | Algorithm | Store |
|---|---|---|
| InMemoryBackend | Fixed Window | Dashmap |
| RedisBackend | Fixed Window | Redis |
Getting Started
// A backend is responsible for storing rate limit data, and choosing whether to allow/deny requests
let backend = builder.build;
// Assign a limit of 5 requests per minute per client ip address
let input = new
.real_ip_key
.build;
let middleware = builder.add_headers.build;
// Apply the middleware to your actix app/routes
new.wrap