0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-03 04:02:44 +00:00
This reverts commit 077511dfa7, reversing
changes made to facbc5f6dc.
This commit is contained in:
Trevor Buckner
2019-01-22 11:23:35 -05:00
parent 077511dfa7
commit 0c70162a78
9 changed files with 161 additions and 108 deletions

View File

@@ -1,7 +1,7 @@
module.exports = (req, res, next)=>{
module.exports = (req, res, next) => {
if(process.env.NODE_ENV === 'local') return next();
if(req.header('x-forwarded-proto') !== 'https') {
return res.redirect(302, `https://${req.get('Host')}${req.url}`);
}
return next();
};
};