-
Notifications
You must be signed in to change notification settings - Fork 6k
proxy-agent: Use proxy-from-env and add docs #2487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Now we support pretty much every variable under the sun along with $NO_PROXY all correctly and with minimal code on our end.
64bed0e
to
cb72128
Compare
|
||
logger.debug(`using $HTTP_PROXY ${process.env.HTTP_PROXY}`) | ||
// If we do not pass in a proxy URL, proxy-agent will get the URL from the environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we always set it? It looks like it does the same check except the downside is that it runs for every request. The upside is we don't have to check ourselves with http://example.com
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't put this on a good line, should've put it on the if
. I was thinking about how it reads from the environment so I put it here on the comment. 😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we always set it? It looks like it does the same check except the downside is that it runs for every request.
I added the check for logging purposes. This is the log that uncovered the extension host logging bug for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging/debugging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
Now we support pretty much every variable under the sun along with
$NO_PROXY
all correctly and with minimal code on our end.Also added an FAQ entry on them.
@code-asher I'd recommend looking at the PR diff instead of by commit as the early
commits are from my confusion but I'd like to include them for posterity.