2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

Adding support for http_proxy and https_proxy environment variables

This commit is contained in:
Hubert Boma Manilla
2016-08-24 17:05:26 +01:00
committed by Nick Uraltsev
parent 96d7ac2a0c
commit 93ae90ae6e
3 changed files with 108 additions and 6 deletions
+7 -1
View File
@@ -299,7 +299,13 @@ These are the available config options for making requests. Only the `url` is re
// and https requests, respectively, in node.js. This allows to configure options like
// `keepAlive` that are not enabled by default.
httpAgent: new http.Agent({ keepAlive: true }),
httpsAgent: new https.Agent({ keepAlive: true })
httpsAgent: new https.Agent({ keepAlive: true }),
// 'proxy' defines the hostname and port of the proxy server
proxy: {
host: '127.0.0.1',
port: 9000
}
}
```