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

adding IP range support to remoteAddress #58

Merged
merged 2 commits into from
Nov 17, 2017

Conversation

leftieFriele
Copy link
Contributor

Adding a gazilion IPs manually is somewhat of a pain, therefor adding support for IPv4 ranges would really make things easier.
This PR uses the ip module to validate the ranges. I have not updated the docs on this as I wasn't sure if that should go into the PR.

@coveralls
Copy link

coveralls commented Nov 17, 2017

Coverage Status

Coverage increased (+0.02%) to 98.639% when pulling 350b011 on leftieFriele:supportipranges into 768240e on Unleash:master.

return true;
}
}
if (range === context.remoteAddress) {
Copy link
Member

@ivarconr ivarconr Nov 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Maybe this should the the first if statement. Feels like this could be faster than the range check?

@ivarconr
Copy link
Member

Awesome 🔥 .

Range-support has been on my wishlist for a while. We should port it to the other client implementations as well.

I can release this as 2.3.1 pretty fast, as soon as we settle this PR.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 98.639% when pulling 6f5fb80 on leftieFriele:supportipranges into 768240e on Unleash:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 98.639% when pulling 6f5fb80 on leftieFriele:supportipranges into 768240e on Unleash:master.

@ivarconr
Copy link
Member

released as 2.3.1 (https://www.npmjs.com/package/unleash-client)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants