From 57a7808b093a89ef58c0dc98221735845f1dd3b1 Mon Sep 17 00:00:00 2001 From: Brian DeHamer Date: Fri, 16 Aug 2024 15:03:40 -0700 Subject: [PATCH] fix encoding for proxy auth token Signed-off-by: Brian DeHamer --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 6f575f7..6ee9ae4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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