From ada9e00cdaa133d77c9e983d1cac615ddfbf3cf0 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 --- packages/http-client/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/http-client/src/index.ts b/packages/http-client/src/index.ts index 6f575f7d..6ee9ae43 100644 --- a/packages/http-client/src/index.ts +++ b/packages/http-client/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