Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
Do not configure proxyAuth when no proxy authentication is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
poppin3000 authored Mar 23, 2021
1 parent 9dc4079 commit e3934bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ export class HttpClient {
maxSockets: maxSockets,
keepAlive: this._keepAlive,
proxy: {
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`,
...((proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` }),
host: proxyUrl.hostname,
port: proxyUrl.port
}
Expand Down

0 comments on commit e3934bd

Please sign in to comment.