From 3be987891b46e5723d333c4021a3abd46a2419d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=87=AF90331?= <90331@sangfor.com> Date: Fri, 15 May 2026 14:33:33 +0800 Subject: [PATCH] fix(raw-dump): add user-agent header to worker requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set User-Agent to csc/${version} in both auth() and authWithFallback() Signed-off-by: 林凯90331 <90331@sangfor.com> Co-authored-by: CoStrict --- src/services/rawDump/worker.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/rawDump/worker.ts b/src/services/rawDump/worker.ts index dd1a4864d..4b7dd743a 100644 --- a/src/services/rawDump/worker.ts +++ b/src/services/rawDump/worker.ts @@ -216,6 +216,7 @@ export async function auth() { const clientId = creds.machine_id || process.env.CSC_MACHINE_ID || 'unknown' headers.set('zgsm-client-id', clientId) headers.set('zgsm-client-ide', 'cli') + headers.set('User-Agent', `csc/${version}`) const accessPayload = parseJWT(creds.access_token) as JwtPayload let refreshPayload: JwtPayload | null = null @@ -742,6 +743,7 @@ export async function authWithFallback(): Promise< headers.set('zgsm-client-id', clientId) headers.set('zgsm-client-ide', 'cli') headers.set('X-Costrict-Version', `csc-${version}`) + headers.set('User-Agent', `csc/${version}`) return { baseUrl: resolveRawDumpBaseUrl(),