Skip to content

Commit

Permalink
Added support for “x-forwarded-proto” header.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshAppDev committed Mar 20, 2019
1 parent ef7d7d1 commit 06b37da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/passport-cas.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ CasStrategy.prototype.authenticate = function(req, options) {
// The `service` string is the current URL, minus the ticket
delete reqURL.query['ticket'];
service = url.format({
protocol: req.headers['x-proxied-protocol'] || req.protocol || 'http',
protocol: req.headers['x-forwarded-proto'] || req.headers['x-proxied-protocol'] || req.protocol || 'http',
host: req.headers['x-forwarded-host'] || req.headers.host || reqURL.host,
pathname: req.headers['x-proxied-request-uri'] || reqURL.pathname,
query: reqURL.query
Expand Down

0 comments on commit 06b37da

Please sign in to comment.