Do not configure proxyAuth when no proxy authentication is provided
This commit is contained in:
2
index.ts
2
index.ts
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user