Rate Limiting
Control request rates to your endpoints with configurable limits and windows
Basic Configuration
- endpoint:
method: GET
path: /rate-limited
response:
status: 200
headers:
Content-Type: application/json
body: >
{"message": "Rate limited endpoint"}
rate-limit:
window-ms: 60000 # 1 minute window
max-requests: 10 # Allow 10 requests per window
key-fn: remote-addr # Use client IP as the rate limit keyConfiguration Options
Rate Limit Response Headers
Rate Limit Exceeded Response
Examples
Basic Rate Limiting
Different Keys for Rate Limiting
High-Traffic Endpoint
Testing Rate Limits
Last updated
Was this helpful?