Open fgblomqvist opened 1 year ago
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?
http://expressjs.com/en/api.html
As you can see, they're case-insensitive by default. Or am I missing something?
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
totrue
should lowercase all paths before they're passed to thenormalizePath
function.