Code Monkey home page Code Monkey logo

connect-ratelimit's People

Contributors

aaronacerboni avatar brotchie avatar chrisnewtn avatar evanhahn avatar jhwarnock avatar premasagar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

connect-ratelimit's Issues

Add blacklist

Blacklists could disallow certain clients to connect or be subject to a different ratelimit rule.

Add option to carry on the connect chain even if rate exceeded

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'
}

Don't hold state in module

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

NPM account

Add dharmafly as an owner of the NPM module

update npm version

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.