-
-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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 before Router (router//route) #4427
Comments
Consecutive multiple path separators (the forward slash, in your case) in the URLs do not have any significance in the modern-day operating systems. But it is advised not to use like so. Please refer to the Stackoverflow question here - https://stackoverflow.com/questions/10161177/url-with-multiple-forward-slashes-does-it-break-anything. |
yes, but it's not expected behavior, I'm interested in how to disallow double slashes |
@checnev usually this situation is not good for SEO purposes, I assume it's possible to write a middleware to detect this case and return 301 redirect to correct URI. |
But is it is advised to handle it by writing a middleware as double slashes may cause problems while caching. |
I'm closing this as I truly believe in case this behaviour causes issues - it can be easily handled on middleware level. Please feel free to reopen in case I'm mistaken and we will try to raise it further to maintainers. |
Hello, when i assign a router to the route, then there is access to routes with a double slash at the beginning.
example:
The router is supposed to run on the
/user/test
route, but the/user//test
also works.Environment:
The text was updated successfully, but these errors were encountered: