Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private buildRateLimiter(configuration: IRateLimiterConfiguration, whitelist: string[]): RateLimiterMemory {
return new RLWrapperBlackAndWhite({
limiter: new RateLimiterMemory({
points: configuration.rateLimit,
duration: configuration.duration || 1,
blockDuration: configuration.blockDuration,
}),
whiteList: whitelist,
});
}
}