Adds NO_PROXY support for proxy configuration. Closes #7165#7179
Adds NO_PROXY support for proxy configuration. Closes #7165#7179Zekai-Zhao-321 wants to merge 1 commit intopnp:mainfrom
Conversation
waldekmastykarz
left a comment
There was a problem hiding this comment.
This shouldn't be necessary. Axios, which we're using for handling HTTP requests, supports NO_PROXY natively. Before we start changing the code, let's understand what's wrong exactly.
|
Thanks for the review. You're right, Axios handles The root cause is the manual proxy code from #2698. When #2698 was merged (March 2023), there were two separate HTTP stacks in the CLI. MSAL v2.6.0 had its own Later, when MSAL upgraded from v2 to v5, it switched from raw In the initial PR I kept the manual proxy code intact since I wasn't sure if removing it would break anything. Looking at it more closely, removing it and letting Axios resolve everything natively is the cleaner fix. The 4 existing proxy tests that inspect the Separately, I'm thinking the right fix is to remove the manual proxy code entirely and let Axios handle everything natively. Happy to rework the PR.
|
Summary
shouldBypassProxy()method torequest.tsthat checksNO_PROXY/no_proxyenvironment variables before applying proxy configuration*.domain.com,.domain.com, and*(bypass all)proxy: falseexplicitly when bypassing to prevent Axios from falling back to its own env-var proxy detectionCloses #7165
Test plan
npm run buildpassesHTTP_PROXYandNO_PROXYset —m365 statusandm365 teams chat listboth succeed without a wrapper workaround