|
Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
|
Settings for the in-memory rate limiter. More...
#include <RateLimiter.hpp>
Public Attributes | |
| size_t | max_requests = 100 |
| Burst size and requests allowed per window. | |
| std::chrono::seconds | window {60} |
| std::function< std::string(const http::HttpRequest &)> | key |
| size_t | max_tracked_clients = 100000 |
| Upper bound on remembered clients. | |
Settings for the in-memory rate limiter.
| std::function<std::string(const http::HttpRequest&)> orbit::middleware::RateLimitOptions::key |
Identifies the client. Defaults to the socket address (req.client_ip). Behind a reverse proxy you trust, return the address it forwards instead; never trust client-supplied headers otherwise.
| size_t orbit::middleware::RateLimitOptions::max_requests = 100 |
Burst size and requests allowed per window.
| size_t orbit::middleware::RateLimitOptions::max_tracked_clients = 100000 |
Upper bound on remembered clients.
| std::chrono::seconds orbit::middleware::RateLimitOptions::window {60} |
Window over which max_requests refill