express-uncapitalize
express-uncapitalize copied to clipboard
exclude query strings
trafficstars
Is there any plan to add a feature to exclude query parameters?
So, this is a tough one. Search engines do treat query strings as part of the canonical URL, but I can understand why case sensitivity in the query string would matter. I'll take care of this one in the coming week or two (as an option).
:+1:
any update here?
ensureLowercase = (req, res, next) ->
url = req._parsedUrl
if /[A-Z]/.test url.pathname
url.search ?= ''
res.redirect 301, "#{url.pathname.toLowerCase()}#{url.search}"
else
next()
+1
Any update on this?
PR submitted