We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c36507 commit 10f6b05Copy full SHA for 10f6b05
bin/node-http-proxy
@@ -45,11 +45,21 @@ if (argv.config) {
45
}
46
47
//
48
-// If `config.https` is set, then load those files into the config options.
+// If `config.https` is set, then load the required file contents into the config options.
49
50
if (config.https) {
51
Object.keys(config.https).forEach(function (key) {
52
- config.https[key] = fs.readFileSync(config.https[key], 'utf8');
+ // If CA certs are specified, load those too.
53
+ if (key === "ca") {
54
+ for (var i=0; i < config.https.ca.length; i++) {
55
+ if (config.https.ca === undefined) {
56
+ config.https.ca = [];
57
+ }
58
+ config.https.ca[i] = fs.readFileSync(config.https[key][i], 'utf8');
59
60
+ } else {
61
+ config.https[key] = fs.readFileSync(config.https[key], 'utf8');
62
63
});
64
65
0 commit comments