Can't get geolocation to work with events API #2767
-
I have Plausible up and running perfectly for my sites, with the Regions/geolocation feature working perfectly. I'm now looking at the events API for in-app tracking (for my desktop Mac app). Using CURL to play with this is all working just fine also, with the exception of the geo / regions feature. Everything is recorded as originating from my nearest cloudflare cache server (I think). My setup is like this: When I make a CURL request to my Plausible instance, it all works except the location is ignoring the
You'll notice I have set X-Forwarded-For to Unfortunately nothing I do seems to be able to get Plausible to honour the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
👋 @jeff-h Note that |
Beta Was this translation helpful? Give feedback.
-
Wow, thanks @ruslandoga — really appreciate your input. It totally explains why my Based on your input I went into Cloudflare and attempted to add a "transform rule" to remove the
So it seems Cloudflare don't allow you to remove it :( Do you think Plausible would be open to the idea of a custom header (say, |
Beta Was this translation helpful? Give feedback.
-
Hmm, I tried a "Modify Request Header" rule in Cloudlfare (Rules>Transform Rules) to remove the Two things:
|
Beta Was this translation helpful? Give feedback.
👋 @jeff-h
Note that
cf-connecting-ip
header takes precedence overx-forwarded-for
header in Plausible. So I think when proxying through CloudFlare,-H 'X-Forwarded-For: 151.101.0.81'
is practically ignored.