Skip to content

Commit

Permalink
add check for forwarded for headers
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelpanse committed Jul 17, 2017
1 parent b617a45 commit 3584d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/requestOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function parseHost(Container) {
return new Error('Unable to parse hostname, possibly missing protocol://?');
}

var ishttps = options.https || parsed.protocol === 'https:';
var ishttps = options.https || parsed.protocol === 'https:' || req.headers['cloudfront-forwarded-proto'] === 'https';

return {
host: parsed.hostname,
Expand Down

0 comments on commit 3584d69

Please sign in to comment.