Skip to content

Commit 6d756b6

Browse files
authored
Merge pull request #181 from gorner/update-proxy-agent
Update proxy-agent to v6.3.0 to remove vm2 dep
2 parents b0b68a3 + fba8777 commit 6d756b6

File tree

3 files changed

+122
-199
lines changed

3 files changed

+122
-199
lines changed

lib/s3.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,16 @@ module.exports = CoreObject.extend({
1616

1717
const proxy = this.plugin.readConfig('proxy');
1818
if (proxy) {
19-
this._proxyAgent = this.plugin.readConfig('proxyAgent') || require('proxy-agent');
19+
var agent;
20+
this._proxyAgent = this.plugin.readConfig('proxyAgent');
21+
if (this._proxyAgent) {
22+
agent = this._proxyAgent(proxy);
23+
} else {
24+
const { ProxyAgent } = require('proxy-agent');
25+
agent = new ProxyAgent(proxy);
26+
}
2027
s3Options.httpOptions = {
21-
agent: this._proxyAgent(proxy)
28+
agent
2229
};
2330
}
2431

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"lodash": "^4.17.21",
2626
"mime": "^3.0.0",
2727
"minimatch": "^3.0.3",
28-
"proxy-agent": "^5.0.0",
28+
"proxy-agent": "^6.3.0",
2929
"rsvp": "^4.8.5"
3030
},
3131
"devDependencies": {

0 commit comments

Comments
 (0)