Skip to content
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

fix: Correctly handle search params in redirects when using trailingSlash: true #1537

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

deini
Copy link
Contributor

@deini deini commented Nov 12, 2024

normalizeTrailingSlash expects a pathname but it's getting pathname + search.

This causes redirects to urls like /users/?sort=asc/

Copy link

vercel bot commented Nov 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 7:23am
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 7:23am
next-intl-example-app-router-without-i18n-routing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 7:23am

Copy link

vercel bot commented Nov 12, 2024

@deini is attempting to deploy a commit to the next-intl Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@amannn amannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks a bunch for the great PR @deini! 🙌

@amannn amannn changed the title fix: trailing slash with search params fix: Correctly handle search params in redirects when using trailingSlash: true Nov 13, 2024
@amannn amannn merged commit 03a4620 into amannn:main Nov 13, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants