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

Piwik using CLoudflare IPs instead of real user IPs #10476

Closed
MikeHergaarden opened this issue Sep 7, 2016 · 2 comments
Closed

Piwik using CLoudflare IPs instead of real user IPs #10476

MikeHergaarden opened this issue Sep 7, 2016 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@MikeHergaarden
Copy link

MikeHergaarden commented Sep 7, 2016

When hosting Piwik behind cloudflare the IP reporting is off. This is correct behaviour, but it would be preferred to make use of the cloudflare header that's reporting the real IP for clients.

This could be an easy fix or option:

if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}

@MikeHergaarden
Copy link
Author

I guess apache mod_cloudflare is a better fix

@mattab
Copy link
Member

mattab commented Sep 27, 2016

The solution should be already documented here: http://piwik.org/faq/how-to-install/faq_98/

@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants