metroCode undefined
I'm having an issue with the metro code being undefined (request.cf.metroCode).
I've cloned and uploaded https://github.com/cloudflare/docs-examples/tree/main/workers/geolocation-hello-world as is, and no matter what ip address i've tested with, it's always undefined. I can confirm that maxmind has the correct data for the tested ip addresses.
Is there anything that I'm missing that needs to be defined within wrangler.jsonc to enable this? Or am I missing something that's absent from the example?
GitHub
docs-examples/workers/geolocation-hello-world at main · cloudflare...
Examples surfaced in the Cloudflare Docs. Contribute to cloudflare/docs-examples development by creating an account on GitHub.
2 Replies