Last active
August 31, 2018 09:39
Revisions
-
Hampus Joakim Nilsson revised this gist
Jan 3, 2016 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ app.use(function (req, res, next) { var sslUrl; if (process.env.NODE_ENV === 'production' && req.headers['x-forwarded-proto'] !== 'https') { sslUrl = ['https://hjnilsson.com', req.url].join(''); return res.redirect(sslUrl); } return next(); }); -
Hampus Joakim Nilsson created this gist
Jan 3, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ app.use(function (req, res, next) { var sslUrl; if (process.env.NODE_ENV === 'production' && req.headers['x-forwarded-proto'] !== 'https') { sslUrl = ['https://hjnilsson.com', req.url].join(''); return res.redirect(sslUrl); } return next(); });