mirror of
https://github.com/actions/http-client.git
synced 2025-04-21 17:52:29 +00:00
Do not configure proxyAuth when no proxy authentication is provided
This commit is contained in:
parent
9dc40793b9
commit
e3934bd2d3
2
index.ts
2
index.ts
@ -642,7 +642,7 @@ export class HttpClient {
|
|||||||
maxSockets: maxSockets,
|
maxSockets: maxSockets,
|
||||||
keepAlive: this._keepAlive,
|
keepAlive: this._keepAlive,
|
||||||
proxy: {
|
proxy: {
|
||||||
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`,
|
...((proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` }),
|
||||||
host: proxyUrl.hostname,
|
host: proxyUrl.hostname,
|
||||||
port: proxyUrl.port
|
port: proxyUrl.port
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user