@aikidosec/firewall
Version:
Zen by Aikido is an embedded Web Application Firewall that autonomously protects Node.js apps against common and critical attacks
11 lines (10 loc) • 330 B
TypeScript
/**
* Sliding window rate limiter implementation
*/
export declare class RateLimiter {
readonly maxItems: number;
readonly timeToLiveInMS: number;
private rateLimitedItems;
constructor(maxItems: number, timeToLiveInMS: number);
isAllowed(key: string, windowSizeInMS: number, maxRequests: number): boolean;
}