Skip to content

Commit d7285b9

Browse files
committed
fixup! cli: add --use-env-proxy
1 parent 9b82f97 commit d7285b9

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

doc/api/cli.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3012,6 +3012,7 @@ environment variables during startup, and tunnels requests over the
30123012
specified proxy.
30133013

30143014
This is equivalent to setting the [`NODE_USE_ENV_PROXY=1`][] environment variable.
3015+
When both are set, `--use-env-proxy` or `--no-use-env-proxy` takes precedence.
30153016

30163017
### `--use-largepages=mode`
30173018

@@ -3669,9 +3670,7 @@ environment variables during startup, and tunnels requests over the
36693670
specified proxy.
36703671

36713672
This can also be enabled using the [`--use-env-proxy`][] command-line flag.
3672-
3673-
This currently only affects requests sent over `fetch()`. Support for other
3674-
built-in `http` and `https` methods is under way.
3673+
When both are set, `--use-env-proxy` or `--no-use-env-proxy` takes precedence.
36753674

36763675
### `NODE_V8_COVERAGE=dir`
36773676

lib/internal/process/pre_execution.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ function setupHttpProxy() {
181181
// For fetch, we need to set the global dispatcher from here.
182182
// For http/https agents, we'll configure the global agent when they are
183183
// actually created, in lib/_http_agent.js and lib/https.js.
184-
// TODO(joyeecheung): This is currently guarded with NODE_USE_ENV_PROXY. Investigate whether
185-
// it's possible to enable it by default without stepping on other existing libraries that
186-
// sets the global dispatcher or monkey patches the global agent.
184+
// TODO(joyeecheung): This is currently guarded with NODE_USE_ENV_PROXY and --use-env-proxy.
185+
// Investigate whether it's possible to enable it by default without stepping on other
186+
// existing libraries that sets the global dispatcher or monkey patches the global agent.
187187
}
188188

189189
function setupUserModules(forceDefaultLoader = false) {

0 commit comments

Comments
 (0)