-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: create proper redirect for non-locale paths
When the path didn’t have a locale but the `localePrefix` was set to `always` we let next-intl redirect the user to `/${defaultLocale}/${path}`. On visit we then rewrote that to `/${defaultPathLocale}/${path}` and redirect the client again. This makes sure we do the redirect ourselves skipping an extra redirect
- Loading branch information
1 parent
c3358ea
commit 667d8c4
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@labdigital/next-intl-custom-paths": minor | ||
--- | ||
|
||
Fix double redirect bug when path has no locale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters