@alkihis/express-rate-limit
Advanced tools
Comparing version 5.1.4 to 5.1.5
@@ -15,3 +15,3 @@ "use strict"; | ||
this.resetTime = calculateNextResetTime(windowMs); | ||
const interval = setInterval(this.resetAll, windowMs); | ||
const interval = setInterval(this.resetAll.bind(this), windowMs); | ||
if (interval.unref) { | ||
@@ -35,2 +35,3 @@ interval.unref(); | ||
resetAll() { | ||
console.log('reseting'); | ||
this.hits = {}; | ||
@@ -37,0 +38,0 @@ this.resetTime = calculateNextResetTime(this.windowMs); |
{ | ||
"name": "@alkihis/express-rate-limit", | ||
"version": "5.1.4", | ||
"version": "5.1.5", | ||
"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/alkihis/express-rate-limit", |
25327
303