You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I mostly use urls without trailing slashes, but some of the users of our strapi deployments may mistakenly set a trailing slash when creating a custom url alias. For example /about/, this mean I cannot fetch the entry by using /webtools/router?path=/about. From a user perspective /about and /about/ will be the same, this it would be nice to have an option such that they would resolve to the same and you could not have a page with both paths.
Why is it needed?
Some users are not the most technical and I also believe it is needed for "idiot proofing"
Suggested solution(s)
No duplicates: whenever a path is updated or created, we should check whether or not the path exists with or without trailing slash.
Enforce style: Whether or not the plugin should enforce using trailing slashes or no trailing slashes. This would mean that it should check the url path before saving and either remove or set trailing slashes.
The text was updated successfully, but these errors were encountered:
For my use case I am using nextjs and nextjs seems to redirect you if you are using trailing slashes, which means the router never has a trailing slash. Because of this I would like it to be something that only the developer can change. (nextjs docs)
On the other hand, other frontends might just not care about this and then it would make sense that the end user could change this option.
So maybe this could be an option in the plugin configuration in config/plugins.ts?
Feature request
Summary
I mostly use urls without trailing slashes, but some of the users of our strapi deployments may mistakenly set a trailing slash when creating a custom url alias. For example
/about/
, this mean I cannot fetch the entry by using/webtools/router?path=/about
. From a user perspective/about
and/about/
will be the same, this it would be nice to have an option such that they would resolve to the same and you could not have a page with both paths.Why is it needed?
Some users are not the most technical and I also believe it is needed for "idiot proofing"
Suggested solution(s)
The text was updated successfully, but these errors were encountered: