Enable ip geolocation on cloudflare worker on workers.dev domain ?
Is it possible to add the ip geolocation on a cloudflare worker which is served from *.workers.dev ?
If so how to do because the documentation don't mention it.
https://developers.cloudflare.com/network/ip-geolocation/
Cloudflare Docs
IP geolocation · Cloudflare Network settings docs
IP geolocation adds the CF-IPCountry header to all requests to your origin server.
2 Replies
you can't enable the headers but you can just use the request.cf object https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties
Thanks I will just use that instead