mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
bug fix
This commit is contained in:
parent
a37fba5524
commit
31086df654
2 changed files with 3 additions and 5 deletions
|
|
@ -36,9 +36,7 @@ server = http.createServer(expressApp);
|
|||
|
||||
module.exports = server;
|
||||
|
||||
Set(before(other(routes, as(early(as(possible))))));
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ server = http.createServer expressApp
|
|||
module.exports = server
|
||||
|
||||
# Force SSL
|
||||
Set before other routes, as early as possible
|
||||
if process.env.NODE_ENV=='production'
|
||||
# Set before other routes, as early as possible
|
||||
if process.env.NODE_ENV!='production'
|
||||
expressApp.get '*', (req, res, next) ->
|
||||
if req.headers['x-forwarded-proto']!='https'
|
||||
res.redirect('https://'+req.headers.host+req.url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue