-
Notifications
You must be signed in to change notification settings - Fork 751
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
get the real client ip address. #3588
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but I'd like to update the documentation included a bit on this since it is adding a new API to the process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
According to MDN the specified header can return a list of IPs due to proxies. In our development environment we had this bug because we already have an internal method for getting the UserIP (MyTokens geolocation token, for example). Some load balancers/proxies do add their IP to this header, others don't, others use another header field. It all depends on their configuration, but in order to prevent unwanted behavior, i think you should split by comma and use the first IP found in the header. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix #3587