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

slash at the end of route #24

Open
omerts opened this issue Jan 12, 2017 · 5 comments
Open

slash at the end of route #24

omerts opened this issue Jan 12, 2017 · 5 comments

Comments

@omerts
Copy link

omerts commented Jan 12, 2017

Hey,

Currently when there is a slash at the end of a route, the match function returns false.
For example:

routeParser('/test').match('/test/') // false

Is this the expected behavior? Shouldn't the above return a truthful value, since the slash at the end doesn't have a real meaning?

@firasdib
Copy link

firasdib commented Feb 7, 2017

They are technically two different routes, and I believe google would index them as such? I could be wrong though.

@omerts
Copy link
Author

omerts commented Feb 7, 2017

@firasdib From what I know, websites will serve the same content if there is or isn't a preceding slash. Just try to add/remove the trailing slash from this issue :).

@firasdib
Copy link

firasdib commented Feb 7, 2017

@goliatone
Copy link

@firasdib while you are technically right it does seem other routers might treat it (wrongly?) as if it was the same route. I guess a note in the documentation would prevent some surprises.

@pietrovismara
Copy link

pietrovismara commented Oct 19, 2022

@goliatone Can confirm a note in the documentation would have prevented me some surprises :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants