Skip to content

Commit

Permalink
Merge pull request #510 from l10rdev/main
Browse files Browse the repository at this point in the history
also use pathname for creating proxy.
  • Loading branch information
codykaup authored Jan 27, 2022
2 parents 036dc5c + c50ddda commit 4b6cf13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin-src/io/getProxyAgent.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const getProxyAgent = ({ env, log }, url, options = {}) => {
log.debug({ url, proxy, options }, 'Using proxy agent');
const requestHost = new URL(url).host;
if (!agents[requestHost]) {
const { hostname, port, protocol, username, password } = new URL(proxy);
const { hostname, port, protocol, username, password, pathname } = new URL(proxy);
const auth = username && password ? `${username}:${password}` : undefined;
agents[requestHost] = new HttpsProxyAgent({ auth, hostname, port, protocol, ...options });
agents[requestHost] = new HttpsProxyAgent({ auth, hostname, port, protocol, pathname, ...options });
}
return agents[requestHost];
};
Expand Down

0 comments on commit 4b6cf13

Please sign in to comment.