Skip to content

fix(nuxt): register redirect middleware before server router push#27016

Merged
danielroe merged 1 commit intomainfrom
fix/router-redirection
May 1, 2024
Merged

fix(nuxt): register redirect middleware before server router push#27016
danielroe merged 1 commit intomainfrom
fix/router-redirection

Conversation

@danielroe
Copy link
Copy Markdown
Member

🔗 Linked issue

closes #26994
resolves #26882

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This reverts the change in #26519 that caused this issue, and registers the redirection middleware earlier to ensure it's called on the initial router.push. Previously exactly the same issue was caused by using isSamePath and I think it's safer not to use at all.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On Vercel, Nuxt v3.11.2 causes infinite redirect when query string contains + is passed

1 participant