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

[Feature]: Re-introduce strict flag to routes #8550

Closed
kjschiroo opened this issue Jan 2, 2022 · 1 comment
Closed

[Feature]: Re-introduce strict flag to routes #8550

kjschiroo opened this issue Jan 2, 2022 · 1 comment
Labels

Comments

@kjschiroo
Copy link

What is the new or updated feature that you are suggesting?

V6 removed the strict attribute from <Route> preventing the enforcement of a trailing slash in a route. I'd advocate it be reintroduced.

Why should this feature be included?

Relative links are handled differently depending on whether there is a trailing slash in the current URL. If a user is on the page example.com/foobar and there is a link with href="fizbuzz", the browser will go to example.com/fizbuzz. However if they are on the page example.com/foobar/ and they use the same link the browser will take them to example.com/foobar/fizbuzz. By removing the strict attribute it complicates taking advantage of this designed behavior in html. With the strict attribute it is possible to plan for clients to have the trailing slash and redirect direct traffic to the correct path. Without the attribute the component would need to change how links are rendered based on whether there is a trailing slash.

@kjschiroo
Copy link
Author

After reading through additional documentation I see this has been given consideration. While I disagree with the decision that was made here I doubt that a random issue will change anyone's mind so I will be closing this.

brophdawg11 added a commit that referenced this issue Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant