-
Hi everyone, I am working on a website with a lot of locales and I want to redirect the user to the correct one based on the IP if they reached the root of the website For the IP service, we are thinking to use cloudflare ip geolocation: https://developers.cloudflare.com/network/ip-geolocation/ Do you have any idea how to implement this with Nuxt I18n? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So I have found a workaround, I don't know if it is really clean. But I have created a server route at the root |
Beta Was this translation helpful? Give feedback.
So I have found a workaround, I don't know if it is really clean. But I have created a server route at the root
server/routes/index.ts
and manage the redirection here with thesendRedirect
function fromh3
. So I can implement my logic here (look for a cookie, look for the ip region and default locale).