express-rate-limit
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -1,32 +0,39 @@ | ||
import { RequestHandler, Request, Response, NextFunction } from 'express'; | ||
import {RequestHandler, Request, Response, NextFunction} from 'express'; | ||
export interface Options { | ||
max?: number; | ||
message?: any; | ||
headers?: boolean; | ||
windowMs?: number; | ||
store?: Store | any; | ||
statusCode?: number; | ||
skipFailedRequests?: boolean; | ||
skipSuccessfulRequests?: boolean; | ||
skip?(req?: Request, res?: Response): boolean; | ||
onLimitReached?(req?: Request, res?: Response): void; | ||
handler?(req: Request, res: Response, next?: NextFunction): void; | ||
keyGenerator?(req: Request, res?: Response): string | Request['ip']; | ||
max?: number; | ||
message?: any; | ||
headers?: boolean; | ||
windowMs?: number; | ||
store?: Store | any; | ||
statusCode?: number; | ||
skipFailedRequests?: boolean; | ||
skipSuccessfulRequests?: boolean; | ||
skip?(req?: Request, res?: Response): boolean; | ||
onLimitReached?(req?: Request, res?: Response): void; | ||
handler?(req: Request, res: Response, next?: NextFunction): void; | ||
keyGenerator?(req: Request, res?: Response): string | Request['ip']; | ||
} | ||
export interface Store { | ||
hits: { | ||
[key: string]: number; | ||
}; | ||
resetAll(): void; | ||
resetTime: number; | ||
setInterval: NodeJS.Timeout; | ||
resetKey(key: string | any): void; | ||
decrement(key: string | any): void; | ||
incr(key: string | any, cb: (err?: Error, hits?: number) => void): void; | ||
hits: { | ||
[key: string]: number; | ||
}; | ||
resetAll(): void; | ||
resetTime: number; | ||
setInterval: NodeJS.Timeout; | ||
resetKey(key: string | any): void; | ||
decrement(key: string | any): void; | ||
incr(key: string | any, cb: (err?: Error, hits?: number) => void): void; | ||
} | ||
declare function RateLimit(options?: Options): (req: Request, res: Response, next: NextFunction) => void; | ||
export = RateLimit; | ||
export declare function RateLimit(options?: Options): (req: Request, res: Response, next: NextFunction) => void; |
{ | ||
"name": "express-rate-limit", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/nfriedly/express-rate-limit", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17598
191