-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
statusCode in rootRedirect not working with strategy 'prefix' #2758
Comments
Thanks for reporting, after some initial debugging it looks like this happens when the 'prefix' is being used. The correct statusCode is being used when using other strategies, will look into this later. |
Hi @BobbieGoede Is it possible to change the 302 redirects to a 301 without using We want all our default locale redirects to be 301s. For example:
|
@readio |
The fix for this issue is included in the latest edge release, I've changed your reproduction with it installed to demonstrate here. |
Environment
Linux
v20.11.0
3.9.1
3.10.0
2.8.1
pnpm@8.14.1
-
extends
,app
,i18n
-
-
Reproduction
https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-tdp4cc?file=nuxt.config.ts
To reproduce, open the preview in a new tab and watch Network Devtools while navigating to
/
. It will show a 302 redirect, even though 307 has been configured.Describe the bug
When using
rootRedirect
, thestatusCode
option is ignored (actually overwritten afterwards, I believe) and a302 Found
is returned.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: