-
-
Notifications
You must be signed in to change notification settings - Fork 180
Description
I have added below proxy options referred at - #jaredhanson/passport-oauth2#59
const agent = new HttpsProxyAgent(process.env.HTTP_PROXY); gStrategy._oauth2.setAgent(agent); passport.use(gStrategy);
but its not working, so directly added proxy on node_modules/oauth/lib/oauth2.js for workaround.
var queryStr= querystring.stringify(parsedUrl.query);
if( queryStr ) queryStr= "?" + queryStr;
httpsProxyAgent = new HttpsProxyAgent(process.env.HTTP_PROXY)
var options = {
host:parsedUrl.hostname,
port: parsedUrl.port,
path: parsedUrl.pathname + queryStr,
method: method,
headers: realHeaders
};
options.agent = httpsProxyAgent;
this._executeRequest( http_library, options, post_body, callback );
}
Any permanent fix is available? Every time we cant change the node_modules inside the Docker container. Kindly provide fixes.