mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
try force-ssl again
This commit is contained in:
@@ -36,6 +36,18 @@ server = http.createServer(expressApp);
|
||||
|
||||
module.exports = server;
|
||||
|
||||
Set(before(other(routes, as(early(as(possible))))));
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
expressApp.get('*', function(req, res, next) {
|
||||
if (req.headers['x-forwarded-proto'] !== 'https') {
|
||||
return res.redirect('https://' + req.headers.host + req.url);
|
||||
} else {
|
||||
return next();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
derby.use(require('racer-db-mongo'));
|
||||
|
||||
store = derby.createStore({
|
||||
|
||||
Reference in New Issue
Block a user