User's geolocation and SSR
Unanswered
Least Bittern posted this in #help-forum
Least BitternOP
Does anyone have any experience with getting a user's geolocation in SSR mode?
I've created an edge function for a project that's roughly similar to the example Netlify has: https://edge-functions-examples.netlify.app/example/geolocation
I'm calling the edge function in our
I'm getting the correct location when running a local dev server, but when running in Netlify, myself and the rest of my team are always getting Columbus, OH.
I'm still new to Edge Functions and how it works with SSR, but my thinking on why the data is always showing Columbus, OH is because the server is calling the edge function and that server location (Columbus, OH) happens to be closest to everyone on my team. Though I'm not 100% since the deploys are hidden behind a VPN and firewall.
If that's the case, wondering if anyone has any experience with getting a user's geolocation from Netlify without an edge function?
I've created an edge function for a project that's roughly similar to the example Netlify has: https://edge-functions-examples.netlify.app/example/geolocation
I'm calling the edge function in our
_document.tsx
file as the geolocation data we are using is required to be set here for a feature we are working on (personalization). I'm getting the correct location when running a local dev server, but when running in Netlify, myself and the rest of my team are always getting Columbus, OH.
I'm still new to Edge Functions and how it works with SSR, but my thinking on why the data is always showing Columbus, OH is because the server is calling the edge function and that server location (Columbus, OH) happens to be closest to everyone on my team. Though I'm not 100% since the deploys are hidden behind a VPN and firewall.
If that's the case, wondering if anyone has any experience with getting a user's geolocation from Netlify without an edge function?