polr
polr copied to clipboard
Make the Advanced Analytics compatible with Cloudflare
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.
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).
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 whetherX-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