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
Wrong IP extracted from HTTP_X_FORWARDED_FOR when there is more than one #10342
Comments
A workaround for this is to use a unique header. For example, if using HAProxy in front of Apache you can specify 'option forwardfor header X-Real-Originating-IP' in haproxy.conf and 'HTTP_X_REAL_ORIGINATING_IP' in piwik's config. At least there is a lot less chance of something else using your custom header. |
Thanks for the report! this pull request was created: #10404 |
Just installed it. I will have to wait a few hours for new traffic to come in, but it looks good! Thank you so much. |
When Piwik is set up to get the client IP from the proxy header (proxy_client_headers[] setting) and the header contains more than one IP address, the one Piwik uses is the last one; according to the protocol definition, it should be the first one.
See https://tools.ietf.org/html/rfc7239
How to reproduce:
proxy_client_headers[] = HTTP_X_FORWARDED_FOR
The text was updated successfully, but these errors were encountered: