Commit 5166481
committed
http: use env proxy when agent has no proxyEnv option
When a user creates a custom agent without specifying proxyEnv but
Node.js is configured to use a proxy from the environment (via
--use-env-proxy or NODE_USE_ENV_PROXY), fall back to process.env.
A developer can still explicitly disable proxying for an agent even
when Node.js is configured to use a proxy at runtime, by passing a
falsy proxyEnv explicitly. For example:
const agent = new https.Agent({ proxyEnv: null });
Signed-off-by: swigger <swigger@gmail.com>1 parent 7a11a9b commit 5166481
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
187 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
| |||
0 commit comments