Skip to content

Commit 0aa9f2c

Browse files
committed
proxy_agent.ts: Document that no other code passes in explicit agent
From my inspection as of this date anyway.
1 parent bc7dcfd commit 0aa9f2c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/node/proxy_agent.ts

+8
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ export function monkeyPatch(vscode: boolean): void {
3838
pa = new (proxyagent as any).default(process.env.HTTP_PROXY)
3939
}
4040

41+
/**
42+
* None of our code ever passes in a explicit agent to the http modules but VS Code's
43+
* does sometimes but only when a user sets the http.proxy configuration.
44+
* See https://code.visualstudio.com/docs/setup/network#_legacy-proxy-server-support
45+
*
46+
* Even if they do, it's probably the same proxy so we should be fine! And those are
47+
* deprecated anyway.
48+
*/
4149
const http = require("http")
4250
const https = require("https")
4351
http.globalAgent = pa

0 commit comments

Comments
 (0)