Join the Webstudio community

Updated last week

CF-IPCountry header information?

I'd like to be able to either serve geo-targeted content to my visitors. Cloudflare has the CF-IPCountry header that contains the necessary country location information I need. Any thoughts on how I can see this header data so that I can make use of it?
1
O
I
A
6 comments
Just checked with the team. Indeed that info could be easily added to request headers we are creating for the API calls, so on the API side one could use that info to serve any adapted content. Sounds like a low hanging fruit, you are the first one to ask for it!
We can add that info into system variable
(Some fake data at the builder, but real at the published site)
Attachment
image.png
There are many third party API services that provide IP to country data. I just liked the idea of keeping as much as I can within the CF ecosystem.
This will invalidate all cdn caches
Yeah, endpoint should be fast if someone is using this
Add a reply
Sign up and join the conversation on Discord