Skip to content
Permalink
Browse files

#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 3a347af543932443d6deeb07cb7a10f569d3c163
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/http-proxy/common.js
@@ -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;

0 comments on commit 3a347af

Please sign in to comment.
You can’t perform that action at this time.