ugh. no ssl
This commit is contained in:
@@ -60,9 +60,6 @@ publicPath = path.join(root, 'public');
|
||||
|
||||
habitrpgMiddleware = function(req, res, next) {
|
||||
var model;
|
||||
if (req.headers['x-forwarded-proto'] !== 'https') {
|
||||
res.redirect('https://' + req.headers.host + req.url);
|
||||
}
|
||||
model = req.getModel();
|
||||
model.set('_mobileDevice', /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(req.header('User-Agent')));
|
||||
auth.setRequest(req);
|
||||
|
||||
@@ -36,10 +36,6 @@ root = path.dirname path.dirname __dirname
|
||||
publicPath = path.join root, 'public'
|
||||
|
||||
habitrpgMiddleware = (req, res, next) ->
|
||||
# Force SSL
|
||||
if req.headers['x-forwarded-proto']!='https'
|
||||
res.redirect('https://'+req.headers.host+req.url)
|
||||
|
||||
model = req.getModel()
|
||||
## Set _mobileDevice to true or false so view can exclude portions from mobile device
|
||||
model.set '_mobileDevice', /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(req.header 'User-Agent')
|
||||
|
||||
Reference in New Issue
Block a user