redirect-ssl
redirect-ssl copied to clipboard
exclude does not match hostname per readme
The readme currently has this example for using the exclude
option:
app.use(redirectSSL.create({
exclude: ['localhost']
}))
However, redirect-ssl uses req.url
which will not include the hostname like "localhost". If I make a request to http://localhost/foobar, req.url
will be /foobar
and I won't be able to use the exclude
option in the way the readme uses it to exclude a request like this one.
I'm having the same issue
looks like you would have to include the req.headers.host
to get the full URL, including 'localhost'
the line that curtgrimes linked (L30) would then become const url = req.headers.host + req.url || ''