File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ proxy-agent
4
4
[ ![ Build Status] ( https://travis-ci.org/TooTallNate/node-proxy-agent.svg?branch=master )] ( https://travis-ci.org/TooTallNate/node-proxy-agent )
5
5
6
6
This module provides a function that returns proxying ` http.Agent ` instances to
7
- use based off of a given proxy URI.
7
+ use based off of a given proxy URI. If no URI is provided, then
8
+ [ proxy-from-env] ( https://www.npmjs.com/package/proxy-from-env ) is used to get the URI
9
+ from ` $HTTP_PROXY ` , ` $HTTPS_PROXY ` and ` $NO_PROXY ` among others.
8
10
9
11
An LRU cache is used so that ` http.Agent ` instances are transparently re-used for
10
12
subsequent HTTP requests to the same proxy server.
@@ -47,6 +49,8 @@ var opts = {
47
49
host: ' jsonip.org' ,
48
50
path: ' /' ,
49
51
// this is the important part!
52
+ // If no proxyUri is specified, then https://www.npmjs.com/package/proxy-from-env
53
+ // is used to get the proxyUri.
50
54
agent: new ProxyAgent (proxyUri)
51
55
};
52
56
You can’t perform that action at this time.
0 commit comments