Skip to content

Commit

Permalink
Merge 494d6d6 into a948096
Browse files Browse the repository at this point in the history
  • Loading branch information
noprom committed May 10, 2018
2 parents a948096 + 494d6d6 commit 772e09b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils.js
Expand Up @@ -22,9 +22,10 @@ exports.originalURL = function(req, options) {
options.proxy = true;
}
var trustProxy = options.proxy;
var https = options.https;

var proto = (req.headers['x-forwarded-proto'] || '').toLowerCase()
, tls = req.connection.encrypted || (trustProxy && 'https' == proto.split(/\s*,\s*/)[0])
, tls = req.connection.encrypted || (trustProxy && 'https' == proto.split(/\s*,\s*/)[0]) || https
, host = (trustProxy && req.headers['x-forwarded-host']) || req.headers.host
, protocol = tls ? 'https' : 'http'
, path = req.url || '';
Expand Down

0 comments on commit 772e09b

Please sign in to comment.