mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-22 05:38:46 +00:00
Change host check to proxy check
This commit is contained in:
parent
339dec3ac0
commit
efcf0a57d4
1 changed files with 1 additions and 1 deletions
|
|
@ -124,7 +124,7 @@ function nonApiUrl(req) {
|
|||
}
|
||||
|
||||
module.exports.forceHabitica = function(req, res, next) {
|
||||
if(nconf.get('NODE_ENV') === 'production' && (req.hostname.search('habitica') === -1) && nonApiUrl(req)) {
|
||||
if(nconf.get('NODE_ENV') === 'production' && !isProxied(req) && nonApiUrl(req)) {
|
||||
return res.redirect('https://habitica.com' + req.url);
|
||||
}
|
||||
next();
|
||||
|
|
|
|||
Loading…
Reference in a new issue