提交 48966a87 编写于 作者: C Christof Marti

Copy options disable by default (#60773)

上级 d8317e31
......@@ -56,7 +56,7 @@ Registry.as<IConfigurationRegistry>(Extensions.Configuration)
localize('systemProxyOn', "Use system proxy configuration if not specified in the request options."),
localize('systemProxyForce', "Always use system proxy configuration."),
],
default: 'force',
default: 'off',
description: localize('systemProxy', "Experimental setting: Use the system proxy configuration.")
}
}
......
......@@ -230,7 +230,7 @@ function patches(originals: typeof http | typeof https, agent: http.Agent, setti
return original.apply(null, arguments);
}
if (!options.socketPath && (config === 'force' || config === 'on' && !options.agent)) {
if (!options.socketPath && (config === 'force' || config === 'on' && !options.agent) && options.agent !== agent) {
if (url) {
const parsed = typeof url === 'string' ? nodeurl.parse(url) : url;
options = {
......@@ -240,6 +240,8 @@ function patches(originals: typeof http | typeof https, agent: http.Agent, setti
path: parsed.pathname,
...options
};
} else {
options = { ...options };
}
options.agent = agent;
return original(options, callback);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册