Switch redirect to baseUrl

This commit is contained in:
Blade Barringer 2015-08-04 08:42:53 -05:00
parent c402ec61b2
commit 0c92c4a048

View file

@ -125,7 +125,7 @@ function nonApiUrl(req) {
module.exports.forceHabitica = function(req, res, next) {
if(nconf.get('NODE_ENV') === 'production' && !isProxied(req) && nonApiUrl(req)) {
return res.redirect('https://habitica.com' + req.url);
return res.redirect(baseUrl + req.url);
}
next();
};