From d4ee4902536ace5752d2bc9213425b05719879f7 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 7 Mar 2014 19:13:15 -0700 Subject: [PATCH] don't re-add if array is tagged with __injected --- ssl-root-cas.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ssl-root-cas.js b/ssl-root-cas.js index b576cf3..4372749 100644 --- a/ssl-root-cas.js +++ b/ssl-root-cas.js @@ -4096,4 +4096,6 @@ var cas = module.exports = [ ]; module.exports.inject = function () { var opts = require('https').globalAgent.options; - 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); } + opts.ca.__injected = true; +};