mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
ugh. no ssl
This commit is contained in:
parent
c596e897ff
commit
8e265a1e6c
2 changed files with 0 additions and 7 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue