Created
July 19, 2017 21:17
-
-
Save anonymous/2f1152117513238f9089bda082bbe2e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.use(function(req, res, next) { | |
if (req.secure){ | |
return next(); | |
} | |
res.redirect("https://" + req.headers.host + req.url); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment