-
Notifications
You must be signed in to change notification settings - Fork 543
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
Prerendering a page that uses navigateTo results in an error #1402
Comments
I also get the same behaviour with Nitro 2.5.2 (Nuxt 3.6.2), that I didn't get with Nitro 2.5.1 (Nuxt 3.6.1), but because of
I get this error:
The 307 Temporary Redirect is interpreted as an error. I suppose that all 3xx redirection status codes could be allowed. |
Bumping this as currently any kind of redirect in a route completely blocks pre-rendering completely |
Related #1418 |
Let's followup via #1418 |
now that nitrojs/nitro#1402 and nitrojs/nitro#1418 are fixed.
now that nitrojs/nitro#1402 and nitrojs/nitro#1418 are fixed.
Environment
Reproduction
Do you have a starter template for reproductions?
Describe the bug
If you use
navigateTo
on a (nuxt) page that is prerendered, the prerendering fails as the status code is 302 and not 200:Additional context
This error comes from the check
https://github.com/unjs/nitro/blob/6bc50b2f9416dc9af6ba327440deea2ec8e35a33/src/prerender.ts#L171-L176.
If one adds
res.status !== 302
it works well. I can open a PR with this fix, but I'm not sure if there are any negative consequences or if there is a better way to handle prerenders of redirects.Logs
No response
The text was updated successfully, but these errors were encountered: