1
0
Fork 0

fix encoding for proxy auth token

Signed-off-by: Brian DeHamer <bdehamer@github.com>
pull/1799/head
Brian DeHamer 2024-08-16 15:03:40 -07:00
parent 7cc96bb976
commit ada9e00cda
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

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