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:
committed by
Trevor Buckner
parent
01dbac78ce
commit
954a393fce
@@ -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}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user