Skip to content

Instantly share code, notes, and snippets.

Created July 19, 2017 21:17
Embed
What would you like to do?
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