Skip to content

Commit 3a347af

Browse files
predhmejcrugzz
authored andcommitted
#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.
1 parent fcfb0b3 commit 3a347af

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/http-proxy/common.js

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ common.setupOutgoing = function(outgoing, options, req, forward) {
4949
if (options.auth) {
5050
outgoing.auth = options.auth;
5151
}
52+
53+
if (options.ca) {
54+
outgoing.ca = options.ca;
55+
}
5256

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

0 commit comments

Comments
 (0)