Aller au contenu
Français

rateLimit

Ce contenu n’est pas encore disponible dans votre langue.

rateLimit(options): (handler) => (request) => Promise<HttpResponse>

Defined in: src/http/cache/RateLimit.ts:53

Build a rate-limiter higher-order handler. The returned function wraps a normal handler and returns a new one with rate-limit checks in front. Accepts a plain options object or the fluent RateLimitOptions builder.

RateLimitOptions

(handler) => (request) => Promise<HttpResponse>