0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Revert "Revert "Merge branch 'master' of https://github.com/naturalcrit/homebrewery""

This reverts commit 0c70162a78.
This commit is contained in:
Trevor Buckner
2019-01-22 11:26:33 -05:00
parent 0c70162a78
commit 507f8e0852
9 changed files with 108 additions and 161 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();
};
};