-
Notifications
You must be signed in to change notification settings - Fork 372
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
Double ip address not returning proper location #25
Comments
Any reason why this package needs that functionality? Are you able to parse the ip address yourself, then call getLocation() with that ip address? |
The reason I use a package is for convenience. Yes I could parse the ip myself and specify it, but then I can also just call the maxmind api myself. If double ip's are common enough (apparently they are - I never realized) then maybe the package can just handle it. It's an easy and safe change. |
I can't say that I've ever come across double ip addresses before. I agree that if they are commonly used, it would make sense to automatically account for them. |
It'll look like that in some cases when a chain of addresses is available, for instance when behind a proxy or load balancer. |
This is happening to me behind a CDN. I've seen it return up to 4 IPs in a comma seperated list. The first one is always the one I want. |
Give v1.0.2 a try |
@Torann works great for me, thanks! |
Good to hear :-) |
Hello
After much debug I discovered that my server is returning a double ip address for the remote ip. The remote ip looks like xxx.xxx.xxx.xxx, yyy.yyy.yyy.yyy and the resulting location is returned with default => 1
The double IP is coming from an apache config involving reverse proxy and I have no control over it. Perhaps the package could account for it and just take the first ip?
The text was updated successfully, but these errors were encountered: