Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: skip Axios proxy logic when NODE_USE_ENV_PROXY is enabled on sup…#7300

Open
azadgupta1 wants to merge 1 commit intoaxios:v1.xfrom
azadgupta1:fix-node-env-proxy-collision
Open

fix: skip Axios proxy logic when NODE_USE_ENV_PROXY is enabled on sup…#7300
azadgupta1 wants to merge 1 commit intoaxios:v1.xfrom
azadgupta1:fix-node-env-proxy-collision

Conversation

@azadgupta1
Copy link

Summary

Node.js introduced native environment-variable proxy handling behind NODE_USE_ENV_PROXY starting in Node v22.11.0.

Currently Axios still applies its own proxy logic even when:

  • the user sets NODE_USE_ENV_PROXY=1
  • and they run Node >= 22.11.0

This leads to unexpected behavior because Axios overrides Node's native proxy handling.

Fix

This PR updates the HTTP adapter so that Axios skips its internal proxy logic when both conditions are true:

process.env.NODE_USE_ENV_PROXY === '1' &&
semver.gte(process.versions.node, '22.11.0')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants