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

Option to lowercase all paths #107

Open
fgblomqvist opened this issue Nov 9, 2022 · 2 comments
Open

Option to lowercase all paths #107

fgblomqvist opened this issue Nov 9, 2022 · 2 comments

Comments

@fgblomqvist
Copy link

Since URLs are case-insensitive by nature, I think it would make sense to have an option to lowercase all paths. I'm aware that this could be done by overriding the normalizePath function, but it's very conveninent to not override it and just pass an array of regexes. I also feel like this would be a very common use-case.

E.g. setting lowercasePaths to true should lowercase all paths before they're passed to the normalizePath function.

@disjunction
Copy link
Collaborator

The domain names are case insensitive, but the rest (path and query) are very much case sensitive. And normalizePath is about path, NOT domain name. Could you share any source why you think the paths are case-insensitive?

@fgblomqvist
Copy link
Author

http://expressjs.com/en/api.html

Screen Shot 2022-11-09 at 15 25 25

As you can see, they're case-insensitive by default. Or am I missing something?

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

2 participants