I don’t believe this functionality ever existed It should still exist in Edge Functions (and probably Functions, though I’m not 100% sure about the latter).
Hmm it seems that a country code is still returned from my lambda endpoint. I am sending a request from the UK but x-country is returning DE (The functions server is in Germany)
Is x-country based on where the request is coming from or where the request is handled?
So I am using lambda functions so proxies shouldn’t be a problem. Also the header can be found in a request it just isn’t for the correct country. I think I have figured the problem out though.
Request sent from Netlify Site to my API (Request is sent via functions hosted in Germany)
API will fetch headers from incoming requests (assuming the country will be DE because the request is coming from a function hosted in Germany)
So to get the country code of the user who sends the request via the Netlify Site, I think the only way is to pass the x-country header to the API instead of calculating it natively from the API.
Bit confusing but I think that’s the best way to go about it?