UNPKG

@aikidosec/firewall

Version:

Zen by Aikido is an embedded Application Firewall that autonomously protects Node.js apps against common and critical attacks, provides rate limiting, detects malicious traffic (including bots), and more.

11 lines (10 loc) 330 B
/** * 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; }