-
Notifications
You must be signed in to change notification settings - Fork 103
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
Filter internal IP addresses from X-Forwarded-For header #24
Comments
What if we exposed a flag that you can set, lets say Also thoughts on getting a cohesive list of internal ips? |
@floatdrop in this case, will using Do you have any example headers we can use for the tests? Want to make sure we're using real live data to cover these test cases. |
What about thoughts on naming for the flag: |
@pbojinov we have only tests for filtering ipv4 adresses (all of them from private networks), but no actual headers.
I think |
Sounds good, I'll add this in. Thanks! |
There's an existing dependency on is.js, maybe add it upstream? |
@fluxsauce the dependency is in the package.json. Am I missing something else?
It should install from npm. I'm seeing this when I run a fresh install:
|
@pbojinov I meant add |
Any update on this? |
@Redmega yes it's in progress. I'll have something out soon. |
Awesome to hear. I'm doing a geoip check on an aws box and its grabbing the IP of the box itself. It's hard to tell without intense console logging if its due to incorrectly set headers or the request-ip package itself. It isn't a high priority issue for us so I've left it alone for now, looking forward to the release 👍 |
Probably a better way is to return the first not private ip from x-forwarded-for header instead of null |
what's the status on this? |
Internal ip's (like
192.168.0.1
) is not useful in any way for server, so we often filter internal networks from headers.The text was updated successfully, but these errors were encountered: