don't re-add if array is tagged with __injected
This commit is contained in:
parent
79f26ce66a
commit
2990ddc1c3
|
@ -130,7 +130,8 @@ function dumpCerts(certs) {
|
|||
+ '\n];\n'
|
||||
+ "module.exports.inject = function () {\n"
|
||||
+ " var opts = require('https').globalAgent.options;\n"
|
||||
+ " if (!opts.ca || opts.ca.length < 100) { opts.ca = (opts.ca||[]).concat(cas); }"
|
||||
+ " if (!opts.ca || !opts.ca.__injected) { opts.ca = (opts.ca||[]).concat(cas); }\n"
|
||||
+ " opts.ca.__injected = true;\n"
|
||||
+ "};\n"
|
||||
);
|
||||
console.info("Wrote '" + OUTFILE.replace(/'/g, "\\'") + "'.");
|
||||
|
|
Loading…
Reference in New Issue