I was working with routes in .NET Core and I noticed that when I use the same route but passing it with a lowercase letter, I got access to the same page.
Example: mydomain.com/Account/Login mydomain.com/account/login
Why was there no distinction between uppercase and lowercase in this case? And I am not using services.AddRouting (options => options.LowercaseUrls = true);
to allow this.
I just want to know how that letter distinction works and why it continues to work.
Quote from the Doc :
Text matching is case-insensitive and based on the decoded representation of the URL's path.
And services.AddRouting (options => options.LowercaseUrls = true);
is just used to convert the route template to lowercase. But you can still access it with uppercase Url.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With