Feature request: Gelocation headers

I saw this: IP Geolocation for Serverless Functions – Vercel and would absolutely love if fly.io could provide something like this as well.

In a nutshell, they provide helpful headers like

X-Vercel-IP-Country: JP
X-Vercel-IP-Country-Region: 13
X-Vercel-IP-City: Tokyo

I’m guessing fly already has at least some of this data anyway to enable routing to the correct region instance.

Fly.io already exposes the Fly-Region request header! More info here.

Thanks but not quite what I was looking for - AFAIK this only gives me the general region, not the exact country or city (although I know the latter is usually impossible to get right with IP address alone). Having the country the user connected from would be very helpful.

@siebenj it’s something I was looking for a while back too. A bit more about that and why Fly don’t (currently) provide that:

I ended up putting Cloudflare in front just to get those headers. Far from ideal, but it worked.

Thanks @greg as you say, while not ideal, it’ll do for now!

1 Like