Add baseUrl variable

This commit is contained in:
Blade Barringer
2015-08-04 12:09:54 -05:00
parent 0c92c4a048
commit 5731f00736
+2
View File
@@ -124,6 +124,8 @@ function nonApiUrl(req) {
}
module.exports.forceHabitica = function(req, res, next) {
var baseUrl = nconf.get("BASE_URL");
if(nconf.get('NODE_ENV') === 'production' && !isProxied(req) && nonApiUrl(req)) {
return res.redirect(baseUrl + req.url);
}