Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-limiter

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-limiter - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

1

index.js

@@ -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 @@

2

package.json
{
"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()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc