-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Redirects when multiple slashes #4622
Redirects when multiple slashes #4622
Conversation
|
Hi @ErimTuzcuoglu, Welcome, and thank you for contributing to Remix! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected]. Thanks! - The Remix team |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
6bd6c87
to
fadbd0d
Compare
Is this something we need to consider for servers/runtimes other than express? |
@brophdawg11 No, its just express specific. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ErimTuzcuoglu can you please fix the conflict in the contributors files? 🙏🏼
Protip: put your name in the right spot alphabetically, conflicts will be less likely to happen
@ErimTuzcuoglu I didn't dig too deep, but was able to reproduce this using the Architect template as well? I'm wondering this is something that should be handled in a more central location, or at least should this logic go into each of the adapters. I will probably defer to one of the Remix team members here with more experience in the alternative runtimes. @jacob-ebey @mcansh? |
i just tried a github url and it resolved with the multiple slashes without redirecting - perhaps we follow suit and normalize while matching? however, vercel.com does normalize and redirect, while netlify.com will 404
same with Cloudflare Pages template, but that appears to throw at the miniflare level?
|
2882591
to
69e84ce
Compare
The main problem is actually on URL constructor. It doesn't accept multiple slashes as a url and throws error. So when we removed slashes it works correctly, but for redirection I think we must make different implementations on adapters. As @mcansh said, on vercel we don't need any changes. But if we need I can check also other adapters and fix them too. |
whats interesting is that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ErimTuzcuoglu Please update other adapters as well and rebase this PR to latest dev 🙏🏼
Closing in favor of #5336 |
Closes: #4422
Testing Strategy: New and existing tests pass. We can try slashed routes manually.