proxy-agent: Use proxy-from-env and add docs#2487
Merged
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
code-asher
approved these changes
Dec 18, 2020
| const https = require("https") | ||
|
|
||
| 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. |
Member
There was a problem hiding this comment.
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.
Member
There was a problem hiding this comment.
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. 😛
Contributor
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now we support pretty much every variable under the sun along with
$NO_PROXYall 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.