Router should support case-insensitive root index.html
See original GitHub issueπ feature request
Relevant Package
This feature request is for @angular/router.Description
I am aware that Router paths are case-sensitive. While personally I disagree with that, I can work around it with a custom DefaultUrlSerializer
. What I cannot work around is when a request comes in for /INDEX.HTML. While my custom DefaultUrlSerializer
will essentially make Router work with case-insensitive URLs by lower-casing everything, it doesnβt appear to work for /INDEX.HTML.
I am also aware that the case-sensitivity problem has been brought up before (https://github.com/angular/angular/issues/7691, etc), but I think this is a unique case that is worth looking at.
Describe the solution youβd like
Since Router already appears to handle /index.html internally somewhere, I think in this one-off case it should handle it in a case-insensitive manner to prevent the Cannot match any routes
error.
Describe alternatives youβve considered
I do not see an alternative. I welcome any workarounds!
Sample project / reproduction
I hesitated a bit in considering this a feature request, but in case this is classified as a bug, I put together a repro here.
- Expand the console on the right and add /index.html to the address bar and refresh. You will not see anything wrong.
- Try using /INDEX.HTML and you will see an error (in the console), even though my custom DefaultUrlSerializer lower-cased it (as seen in the console).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (2 by maintainers)
Thank you for submitting your feature request! Looks like during the polling process it didnβt collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angularβs scope, weβd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angularβs feature request process in our documentation.