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

Make the Advanced Analytics compatible with Cloudflare #569

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Tchekda
Copy link

@Tchekda Tchekda commented Oct 20, 2020

With the previous code, the Geoip service was using the Request IP.
In most of the case that works well but if the website is behind CloudFlare, the IP will be the proxy one.

Now it determines user's real IP if behind cloudflare or not. Fixes #499 #491

Tell me if you think something needs to be ajusted.

@strugee
Copy link

strugee commented Dec 8, 2020

This needs to be a config option. If it can't be turned off, then Polr administrators who do not deploy Polr behind a reverse proxy are left vulnerable to forged X-Forwarded-For HTTP headers, or whatever similar mechanism this API call uses (there is no way to securely determine whether X-Forwarded-For is authentic or not without this being set administratively in the config file).

@Tchekda
Copy link
Author

Tchekda commented Dec 8, 2020

This needs to be a config option. If it can't be turned off, then Polr administrators who do not deploy Polr behind a reverse proxy are left vulnerable to forged X-Forwarded-For HTTP headers, or whatever similar mechanism this API call uses (there is no way to securely determine whether X-Forwarded-For is authentic or not without this being set administratively in the config file).

Fair point, will think about that.

The project looks a bit dead, don't think I will make a new PR to add that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All my incomming clicks say they are from USA,
2 participants