How to get the client Country from Cloudflare Pages ?

https://developers.cloudflare.com/network/ip-geolocation/ How to get the equivalent inside the Cloudflare Pages context ? (We're using Astro for a framework)
Cloudflare Docs
IP geolocation · Cloudflare Network settings docs
IP geolocation adds the CF-IPCountry header to all requests to your origin server.
2 Replies
Cyb3r-Jak3
Cyb3r-Jak39mo ago
Once you have it enabled you would pull that info from this header https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry
Cloudflare Docs
Cloudflare HTTP request headers · Cloudflare Fundamentals docs
Cloudflare passes all HTTP request headers to your origin web server and adds additional headers as specified below.
Tristan
TristanOP9mo ago
Ok so no difference between pages and regular domain Thanks
Want results from more Discord servers?
Add your server