1
0
Fork 0

Merge pull request #1799 from actions/bdehamer/http-client-proxy-auth

fix encoding for proxy auth token
pull/1802/merge
Brian DeHamer 2024-08-21 06:41:49 -07:00 committed by GitHub
commit 7298ff3219
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -726,7 +726,9 @@ export class HttpClient {
uri: proxyUrl.href, uri: proxyUrl.href,
pipelining: !this._keepAlive ? 0 : 1, pipelining: !this._keepAlive ? 0 : 1,
...((proxyUrl.username || proxyUrl.password) && { ...((proxyUrl.username || proxyUrl.password) && {
token: `${proxyUrl.username}:${proxyUrl.password}` token: `Basic ${Buffer.from(
`${proxyUrl.username}:${proxyUrl.password}`
).toString('base64')}`
}) })
}) })
this._proxyAgentDispatcher = proxyAgent this._proxyAgentDispatcher = proxyAgent