Open AlanGuo opened 3 years ago
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch oauth@0.9.15 for the project I'm working on.
oauth@0.9.15
Here is the diff that solved my problem:
diff --git a/node_modules/oauth/lib/oauth.js b/node_modules/oauth/lib/oauth.js index 50dccf9..819e689 100644 --- a/node_modules/oauth/lib/oauth.js +++ b/node_modules/oauth/lib/oauth.js @@ -247,6 +247,12 @@ exports.OAuth.prototype._createClient= function( port, hostname, method, path, h method: method, headers: headers }; + // for proxy for local + const HttpsProxyAgent = require('https-proxy-agent'); + const proxy = process.env.http_proxy; + const agent = new HttpsProxyAgent(proxy); + options.agent = agent; + var httpModel; if( sslEnabled ) { httpModel= https;
This issue body was partially generated by patch-package.
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
oauth@0.9.15
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.