Name | Type | Description |
---|---|---|
errorResponseMessage | String | The error message that should be returned in the body of the HTTP 429 response when the rate limit is hit. Default is |
includeInternalRequests | Boolean | Optional, if |
includeMasterKey | Boolean | Optional, if |
redisUrl | String | Optional, the URL of the Redis server to store rate limit data. This allows to rate limit requests for multiple servers by calculating the sum of all requests across all servers. This is useful if multiple servers are processing requests behind a load balancer. For example, the limit of 10 requests is reached if each of 2 servers processed 5 requests. |
requestCount | Number | The number of requests that can be made per IP address within the time window set in |
requestMethods | Array.<String> | Optional, the HTTP request methods to which the rate limit should be applied, default is all methods. |
requestPath | String | The path of the API route to be rate limited. Route paths, in combination with a request method, define the endpoints at which requests can be made. Route paths can be strings, string patterns, or regular expression. See: https://expressjs.com/en/guide/routing.html |
requestTimeWindow | Number | The window of time in milliseconds within which the number of requests set in |
zone | String | The type of rate limit to apply. The following types are supported: |
RateLimitOptions
Properties