0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

Do not force SSL when using Docker

This commit is contained in:
Brandon Fryslie
2020-03-15 16:08:11 -06:00
committed by Trevor Buckner
parent 01dbac78ce
commit 954a393fce

View File

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