express-sslify
express-sslify copied to clipboard
Next() for Localhost
Whenever I use this package, it doesn't work in my local environment because https://localhost:### throws errors. Can we add another check like this?
if(req.headers && req.headers.host && req.headers.host === 'localhost:####') { next(); }
Maybe just do something like this?
if (app.get("env") === "production") {
app.use(enforce.HTTPS({ trustProtoHeader: true }));
}