Open fmacherey opened 3 years ago
I also left a comment here, as it is maybe related https://github.com/vercel/next.js/issues/21810#issuecomment-797412757
We are facing the similar issue with next@12.3.1
Did you find out any workaround? @fmacherey
We figure out this issue. In our case nginx doesn't pass host header to server, so we pass the host and it works normally now
What version of Next.js are you using?
10.0.9
What version of Node.js are you using?
15.5.1
What browser are you using?
Chromium
What operating system are you using?
macOS
How are you deploying your application?
Other
Describe the Bug
We are using domain routing with subdomains to localize our app. I configured three domains with locales in next.config.js:
The default locale is set to
de-DE
I set the domains depending on which env to deploy (local, stage, prod). For localhost, everything works as it expected. When deploying to our stage, the non-defaults aren't working. When logging the whole object returned fromuseRouter
, I figured out, that defaultLocale and locale props seems to be swapped.I also switched off automatic locale detection, so that only the url should be affect the locale.
We are using next with current preact@10.5.13
Expected Behavior
router.defaultLocale is always "de-DE" (in our case) and router.locale is the locale, depending on domain setting.
To Reproduce
see above