Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
#866 Copy CA from options into outbound proxy (#1042)
While using secure: true for proxy connections, there is no way to pass the trusted root CA(s) or intermediate CA(s). This change allows that to be passed in the httpProxy createServer options and used for the outgoing proxy connection.
  • Loading branch information
predhme authored and jcrugzz committed Aug 11, 2016
1 parent fcfb0b3 commit 3a347af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/http-proxy/common.js
Expand Up @@ -49,6 +49,10 @@ common.setupOutgoing = function(outgoing, options, req, forward) {
if (options.auth) {
outgoing.auth = options.auth;
}

if (options.ca) {
outgoing.ca = options.ca;
}

if (isSSL.test(options[forward || 'target'].protocol)) {
outgoing.rejectUnauthorized = (typeof options.secure === "undefined") ? true : options.secure;
Expand Down

0 comments on commit 3a347af

Please sign in to comment.