Skip to content

Make the Advanced Analytics compatible with Cloudflare#569

Open
Tchekda wants to merge 2 commits intocydrobolt:masterfrom
Tchekda:cloudflare-fix
Open

Make the Advanced Analytics compatible with Cloudflare#569
Tchekda wants to merge 2 commits intocydrobolt:masterfrom
Tchekda:cloudflare-fix

Conversation

@Tchekda
Copy link
Copy Markdown

@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
Copy Markdown

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
Copy Markdown
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