express-limiter
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -35,2 +35,3 @@ module.exports = function (app, db) { | ||
res.set('X-RateLimit-Remaining', limit.remaining) | ||
res.set('X-RateLimit-Reset', Math.ceil(limit.reset / 1000)) // UTC epoch seconds | ||
} | ||
@@ -37,0 +38,0 @@ |
{ | ||
"name": "express-limiter", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "rate limiter middleware for express applications", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -46,2 +46,3 @@ var chai = require('chai') | ||
.expect('X-RateLimit-Remaining', item - 1) | ||
.expect('X-RateLimit-Reset', 3600) | ||
.expect(200, function (e) {f(e)}) | ||
@@ -56,2 +57,3 @@ }) | ||
.expect('X-RateLimit-Remaining', 0) | ||
.expect('X-RateLimit-Reset', 3600) | ||
.expect('Retry-After', /\d+/) | ||
@@ -67,2 +69,3 @@ .expect(429, function (e) {f(e)}) | ||
.expect('X-RateLimit-Remaining', 9) | ||
.expect('X-RateLimit-Reset', 7201) | ||
.expect(200, function (e) { | ||
@@ -69,0 +72,0 @@ clock.restore() |
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
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
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
12399
206
1