fix for static pages
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ module.exports.cors = function(req, res, next) {
|
||||
module.exports.locals = function(req, res, next) {
|
||||
res.locals.habitrpg = res.locals.habitrpg || {}
|
||||
_.defaults(res.locals.habitrpg, {
|
||||
NODE_ENV: req.url.split('/')[1] == 'static' ? 'production' : nconf.get('NODE_ENV'), // Don't show debugging options on static pages
|
||||
NODE_ENV: nconf.get('NODE_ENV'), // Don't show debugging options on static pages
|
||||
IS_MOBILE: /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(req.header('User-Agent')),
|
||||
STRIPE_PUB_KEY: nconf.get('STRIPE_PUB_KEY')
|
||||
});
|
||||
|
||||
+3
-3
@@ -12,17 +12,17 @@ router.get('/', function(req, res) {
|
||||
});
|
||||
|
||||
router.get('/partials/tasks', function(req, res) {
|
||||
res.render('tasks/index');
|
||||
res.render('tasks/index', {env: res.locals.habitrpg});
|
||||
});
|
||||
|
||||
router.get('/partials/options', function(req, res) {
|
||||
res.render('options');
|
||||
res.render('options', {env: res.locals.habitrpg});
|
||||
});
|
||||
|
||||
// -------- Marketing --------
|
||||
|
||||
router.get('/splash.html', function(req, res) {
|
||||
res.redirect('/static/front');
|
||||
res.redirect('/static/front', {env: res.locals.habitrpg});
|
||||
});
|
||||
|
||||
router.get('/static/front', function(req, res) {
|
||||
|
||||
Reference in New Issue
Block a user