Geolocation problem 2.1.1 - country is not changing (X-Forwarded-For ignored) #4594
Replies: 1 comment 14 replies
-
Would you be able to trace the headers Plausible receives? If yes, please search for recon_trace in discussions for how to do it :) That information would speed up finding the root cause of this issue. |
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My plausible is behind nginx reverse proxy. I set headers to forward to Plausible:
I see in Caddy logs that everything is received as expected,
X-Forwarded-For
header is set on Caddy side with single value: client IP. Geolocation hower is not working correctly, it uses reverse proxy IP rather usingX-Forwarded-For
value. I've tested with curl and it shows different country when I'm on different IP (changed with VPN), ignoringX-Forwarded-For
. It looks like a bug.I made temporary workaround for that issue. On nginx side I set:
and then plausible uses correct IP.
Edit.
It's worth to mention that because country was not changing, my unique visitors metric also looked incorrect (too small). When country works correctly due to
CF-Connecting-IP
- unique visitors metrics looks good.Beta Was this translation helpful? Give feedback.
All reactions