Add variable to request for user's protocol

This commit is contained in:
Jonathan Cremin 2014-12-06 14:46:30 +00:00
parent 01c7f418dc
commit da5e67f9ad
2 changed files with 6 additions and 3 deletions

View file

@ -30,7 +30,7 @@ module.exports = function(req, res, next) {
page: type,
title: doc.items[0].name + " by " + doc.items[0].artist.name,
items: doc.items,
thisUrl: req.protocol + '://' + req.get('host') + req.originalUrl
thisUrl: req.userProtocol + '://' + req.get('host') + req.originalUrl
});
} else {
Q.timeout(services[serviceId].lookupId(itemId, type), 5000).then(function(item) {
@ -63,7 +63,7 @@ module.exports = function(req, res, next) {
page: type,
title: item.name + " by " + item.artist.name,
items: items,
thisUrl: req.protocol + '://' + req.get('host') + req.originalUrl
thisUrl: req.userProtocol + '://' + req.get('host') + req.originalUrl
});
});
}, function(error) {