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
Chaika
Chaika2w ago
you can't enable the headers but you can just use the request.cf object https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties
Cloudflare Docs
Request · Cloudflare Workers docs
Interface that represents an HTTP request.
mrdotb
mrdotbOP2w ago
Thanks I will just use that instead

Did you find this page helpful?