OptionalerrorOptionalhandlerOverride the default 429 response.
OptionalkeyFunction producing the bucket key. Defaults to request.remoteIp || request.ip.
OptionallegacyEmit legacy X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset headers.
Maximum requests allowed per key per window.
OptionalskipPredicate; when truthy the request is not counted and is forwarded.
OptionalstandardEmit RateLimit, RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset
headers per draft-ietf-httpapi-ratelimit-headers.
OptionalstorePluggable bucket store. Defaults to an in-process node-cache.
Window length in milliseconds.
Error sink for store failures.