Ending slash is output for pattern without ending slash
See original GitHub issueHi! I decided to build own router and stuck on small mismatch with path-to-regexp behaviour.
I expect /:page
matching /dashboard/activities
do not include slash in the end of dashboard in exec array.
https://codesandbox.io/s/intelligent-fermat-mwv42
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
javascript - Return string without trailing slash - Stack Overflow
Try this: function someFunction(site) { return site.replace(/\/$/, ""); }.
Read more >To slash or not to slash | Google Search Central Blog
This behavior is beneficial because it reduces duplicate content. In the particular case of redirects to trailing slash URLs, our search results will...
Read more >Deprecate trailing slash match and change default value from ...
Whether to match to URLs irrespective of the presence of a trailing slash. If enabled a method mapped to "/users" also matches to...
Read more >Remove trailing slash from links - WordPress.org
I started building a website with permalinks using trailing slash. But the website needs to be without trailing slashes. I already changed permalinks...
Read more >IIS Reverse Proxy Fails without Trailing Slash - Server Fault
If I go to example.com/app/ it works as expected. However, if I go to example.com/app (without the trailing slash), it results in a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Everything in the Polka & Navaid worlds still work with this change 😃
Understood, just making sure.
I still have to investigate some dependents, but I just pushed the code (and way more tests) to #6
I have to step out for a little bit, but if you can verify that that PR behaves as expected, would be appreciated. Back soon 👍