remove enforce https

This commit is contained in:
ian ramzy 2020-03-25 21:01:04 -04:00
parent 4a2ba4fa51
commit 73b50708d3
1 changed files with 0 additions and 12 deletions

View File

@ -8,18 +8,6 @@ var io = require('socket.io')(http);
var path = require('path');
var public = path.join(__dirname, 'public');
// Enforce HTTPS
app.use((req, res, next) => {
if (process.env.NODE_ENV === 'production') {
if (req.headers.host === 'neonchat.io')
return res.redirect(301, 'https://neonchat.io');
if (req.headers['x-forwarded-proto'] !== 'https')
return res.redirect('https://' + req.headers.host + req.url);
else
return next();
} else
return next();
});
app.use(express.static('public'));