Skip to main content

Interface: RateLimitConfig

Defined in: service-core/src/RateLimiter.ts:44

Configuration options for RateLimiter, read from the rateLimit path of the application configuration.

Extended by​

Properties​

ip?​

optional ip?: IPRateLimitConfig

Defined in: service-core/src/RateLimiter.ts:56

Configuration for the additional, independent per-source-IP counter.


maxAttempts?​

optional maxAttempts?: number

Defined in: service-core/src/RateLimiter.ts:52

The maximum number of attempts allowed within windowSeconds before being rejected. Default is 100. Note that when driven by the @RateLimit decorator without perUser, this counts attempts against the identifier <method>|<path> (see RouteUtils.checkRateLimiter()), i.e. combined across every caller of that route, not per-caller - the default is set well above the per-IP default below for that reason. With perUser the identifier is scoped to the user's uid, or to the client IP for anonymous callers.


windowSeconds?​

optional windowSeconds?: number

Defined in: service-core/src/RateLimiter.ts:54

The length of the sliding window, in seconds, that maxAttempts applies to. Default is 60.