RateLimitOptions
Defined in: src/plugins/middleware/rate-limit.ts:4
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
|
|
Interval in milliseconds to clean up expired entries. Defaults to windowMs. |
||
|
|
Whether to include X-RateLimit headers in the response |
||
|
( |
Function to generate a unique key for each request This is used to identify the user or source of the request Defaults to the request’s ip address. |
||
|
|
Alias for max |
||
|
|
Maximum number of requests allowed in the window |
||
|
|
Message to send when rate limited |
||
|
|
Mode to use for rate limiting
|
||
|
( |
Function to execute when a request is rate limited |
||
|
( |
Function to determine whether to skip rate limiting |
||
|
|
Status code to send when rate limited |
||
|
|
List of trusted proxy IPs |
||
|
|
Window in milliseconds |