Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclusions? (by IP or User Agent) #28

Closed
nuclearspike opened this issue Aug 13, 2016 · 2 comments
Closed

Exclusions? (by IP or User Agent) #28

nuclearspike opened this issue Aug 13, 2016 · 2 comments
Labels
question A question related to the library

Comments

@nuclearspike
Copy link

Is there any way to specify to ignore certain user-agents or ips?

After I installed this and set it for normal usage, it ended up failing for newrelic and my load tester sites and I'm looking for a way to white-list user agents or IPs to prevent load testing or new relic from being subject to being rate limited.

@bogini
Copy link

bogini commented Sep 1, 2016

@nuclearspike Check this out

#29

You'd be able to do:

let whitelisted = ['127.0.0.1'];

new RateLimit({
  skip: function(req, res) {
    return whitelisted.indexOf(req.ip) !== -1;
  }
})

@nfriedly
Copy link
Member

nfriedly commented Sep 8, 2016

Fixed by #29

@nfriedly nfriedly closed this as completed Sep 8, 2016
@gamemaker1 gamemaker1 added the question A question related to the library label Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A question related to the library
Projects
None yet
Development

No branches or pull requests

4 participants