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

express-rate-limit

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-rate-limit - npm Package Compare versions

Comparing version 2.7.0 to 2.8.0

4

lib/express-rate-limit.js

@@ -32,3 +32,4 @@ 'use strict';

});
}
},
onLimitReached: function(/*req, res, optionsUsed*/) {}
});

@@ -75,2 +76,3 @@

if (options.max && current > options.max) {
options.onLimitReached(req, res, options);
return options.handler(req, res, next);

@@ -77,0 +79,0 @@ }

{
"name": "express-rate-limit",
"version": "2.7.0",
"version": "2.8.0",
"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",

@@ -119,2 +119,8 @@ # Express Rate Limit

```
* **onLimitReached**: Function to listen each time the limit is reached. You can use it to debug/log. Defaults:
```js
function (req, res, options) {
/* empty */
}
```
* **store**: The storage to use when persisting rate limit attempts. By default, the [MemoryStore](lib/memory-store.js) is used. It must implement the following in order to function:

@@ -121,0 +127,0 @@ ```js

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