Skip to content

Commit

Permalink
https-proxy-agent@7
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Jul 7, 2023
1 parent 4cb7062 commit f9c24a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ const plainAgent = new HttpsAgent({
let getAgent = () => plainAgent

if (proxyAddress) {
// todo: this doesn't honor `keepAlive: true`
// related:
// - https://github.com/TooTallNate/node-https-proxy-agent/pull/112
// - https://github.com/TooTallNate/node-agent-base/issues/5
const agent = new ProxyAgent(proxyAddress)
const agent = new ProxyAgent(proxyAddress, {
keepAlive: true,
})
getAgent = () => agent
} else if (localAddresses) {
const agents = process.env.LOCAL_ADDRESS.split(',')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"cross-fetch": "^3.1.5",
"google-polyline": "^1.0.3",
"gps-distance": "0.0.4",
"https-proxy-agent": "^5.0.0",
"https-proxy-agent": "^7.0.0",
"lodash": "^4.17.5",
"luxon": "^3.1.1",
"object-scan": "^13.0.0",
Expand Down

0 comments on commit f9c24a4

Please sign in to comment.