RateLimitPluginOptions
RateLimitPluginOptions
Runtime plugin options consumed by RateLimitPlugin. Configure these via configureRatelimit().
Signature
interface RateLimitPluginOptions {
defaultLimiter?: RateLimitLimiterConfig;
limiters?: Record<string, RateLimitLimiterConfig>;
storage?: RateLimitStorageConfig;
keyPrefix?: string;
keyResolver?: RateLimitKeyResolver;
bypass?: RateLimitBypassOptions;
hooks?: RateLimitHooks;
onRateLimited?: RateLimitResponseHandler;
queue?: RateLimitQueueOptions;
roleLimits?: Record<string, RateLimitLimiterConfig>;
roleLimitStrategy?: RateLimitRoleLimitStrategy;
initializeDefaultStorage?: boolean;
initializeDefaultDriver?: boolean;
}
defaultLimiter
property
limiters
property
Record<string, RateLimitLimiterConfig>storage
property
keyPrefix
property
stringkeyResolver
property
bypass
property
hooks
property
onRateLimited
property
queue
property
roleLimits
property
Record<string, RateLimitLimiterConfig>roleLimitStrategy
property
initializeDefaultStorage
property
booleandefault:
trueWhether to initialize the default in-memory storage if no storage is configured.
initializeDefaultDriver
property
booleandefault:
trueAlias for initializeDefaultStorage, aligned with other packages.