-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
double slash followed by any char after domain causes infinite page reloading #9692
Comments
This should be resolved via #9695 and available in the next release 👍 |
🤖 Hello there, We just published version Thanks! |
Bug persists on When navigating on On On server : On On server : When navigating on On 404 Not Found On When navigating on On On |
ah ok so this instance wasn't just from a url mismatch after all. I'll reopen and we can consider trying to detect and resolve this but I think I would recommend tackling this in user land for now and just redirecting prior to handling off the double-slash url to the Remix handler. Yolu could put this right before the remix handler in your express server: app.all("*", (req, res, next) => {
if (req.path.includes('//')) {
res.redirect(req.path.replace(/\/+/g, '/'));
} else {
next();
}
}); |
🤖 Hello there, We just published version Thanks! |
Reproduction
Add double slash followed by any char after domain (e.g. https://example.com//foo), then Enter.
System Info
Used Package Manager
npm
Expected Behavior
404 Not Found
Actual Behavior
Infinite reloading with this console error log:
"Initial URL (/) does not match URL at time of hydration (//foo), reloading page..."
Some web sites listed on https://remix.run/showcase are affected.
The text was updated successfully, but these errors were encountered: