0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-05 21:02:43 +00:00
This commit is contained in:
Trevor Buckner
2019-01-19 20:00:35 -05:00
parent 71af97e489
commit c1d8796807

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(process.env.NODE_ENV === 'local') return next();
if(req.header('x-forwarded-proto') !== 'https') { if(req.header('x-forwarded-proto') !== 'https') {
return res.redirect(302, `https://${req.get('Host')}${req.url}`); return res.redirect(302, `https://${req.get('Host')}${req.url}`);
} }
return next(); return next();
}; };