dharmafly / connect-ratelimit Goto Github PK
View Code? Open in Web Editor NEWConnect middleware for limiting requests to node.js server per ip/hostname.
Connect middleware for limiting requests to node.js server per ip/hostname.
Blacklists could disallow certain clients to connect or be subject to a different ratelimit rule.
By default the connect chain end with res.end("rate limit exceded")
message if a client has surpassed their limit.
It would be useful to add an option to ignore this rule but this continue up the chain. The ratelimit information can be augmented onto the res
object.
ie:
res.ratelimit = {
exceeded: true,
type: 'whitelist'
}
Hey,
State is held on the file level in this module. This is not a good strategy because it prevents using the module twice for different routes. It will also break should another piece of code in the app or in any of its dependencies also use this module. Under various circumstances two calls to require("connect-ratelimit")
may end up with the same instance.
Cheers
Add dharmafly as an owner of the NPM module
Mocha + Chai
I was totally lost on why my "categories" configuration was not working, and when I decided to look at the code, I realized there's no reference to that.
Please update npm version to match repo. I'll use a git commit fixed dependency for now, but that should help other users
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.