express-slow-down
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -11,2 +11,3 @@ "use strict"; | ||
delayMs: 1000, // milliseconds - base delay applied to the response - multiplied by number of recent hits for the same key. | ||
maxDelayMs: Infinity, // milliseconds - maximum delay to be applied to the response, regardless the request count. Infinity means that the delay will grow continuously and unboundedly | ||
skipFailedRequests: false, // Do not count failed requests (status >= 400) | ||
@@ -57,3 +58,4 @@ skipSuccessfulRequests: false, // Do not count successful requests (status < 400) | ||
if (current > delayAfter) { | ||
delay = (current - delayAfter) * options.delayMs; | ||
const unboundedDelay = (current - delayAfter) * options.delayMs; | ||
delay = Math.min(unboundedDelay, options.maxDelayMs); | ||
} | ||
@@ -60,0 +62,0 @@ |
{ | ||
"name": "express-slow-down", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Basic IP rate-limiting middleware for Express that slows down responses rather than blocking the user.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/nfriedly/express-slow-down", |
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
11027
138