Interface: RateLimitOptions
Defined in: service-core/src/decorators/RouteDecorators.ts:336
Configuration options for RateLimiter, read from the rateLimit path of the application configuration.
Extends
Properties
id?
optionalid?:string
Defined in: service-core/src/decorators/RouteDecorators.ts:337
ip?
optionalip?:IPRateLimitConfig
Defined in: service-core/src/RateLimiter.ts:56
Configuration for the additional, independent per-source-IP counter.
Inherited from
maxAttempts?
optionalmaxAttempts?: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.
Inherited from
perUser?
optionalperUser?:boolean
Defined in: service-core/src/decorators/RouteDecorators.ts:338
windowSeconds?
optionalwindowSeconds?:number
Defined in: service-core/src/RateLimiter.ts:54
The length of the sliding window, in seconds, that maxAttempts applies to. Default is 60.