-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client side navigation with domain locales doesn't work for localhost (and any other domain) #22011
Comments
Note this also affects the ability to use Vercel's deployment URLs: If we have an app that uses |
And #21211 by @sebastian-nowak seems to be the same too. |
Hi, this has been updated in the latest canary of Next.js |
Works perfectly, thank you! |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
v10.0.5
to latest version (v10.0.7-canary.6
as of today)What version of Node.js are you using?
v12.18.3 (should be replicable in any)
What browser are you using?
Any
What operating system are you using?
Any
How are you deploying your application?
next start
Describe the Bug
When using the i18n domain routing, client-side navigation is broken when using a domain not included in the domains config, such as
localhost
.The problem was probably introduced with this change included on
v10.0.5
:#20562
Expected Behavior
The domain routing config should only tell Next.js what's the current locale based on the current domain. If the domain doesn't match any of the domains in the config, it should fallback to the
defaultLocale
and client side navigation should use that domain for anyLink
.To Reproduce
Here is a codesandox using the latest
v10.0.7-canary.6
next:https://codesandbox.io/s/next-i18n-domains-client-navigation-bug-bghx7
example.co.uk
foren
andexample.es
fores
).localhost:3000
, but the problem remains the same.example.co.uk/secondary
and therefore client side navigation is broken under the codesandbox domain (or any other domain running the app).Here is the same codesanbox using next
v10.0.4
:https://codesandbox.io/s/next-i18n-domains-client-navigation-bug-next-v10-0-4-yhs5u
Client side navigation works as expected.
The text was updated successfully, but these errors were encountered: