From ed398321032e88dd502b974a6c696bb560040e1b Mon Sep 17 00:00:00 2001 From: weaigc <879821485@qq.com> Date: Sat, 11 Nov 2023 20:58:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4=20=5FU=20=E4=B8=8E=20?= =?UTF-8?q?MUID=20=E7=9A=84=E7=BB=91=E5=AE=9A=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 99729a0b..b4d73817 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -166,11 +166,11 @@ export function mockUser(cookies: Partial<{ [key: string]: string }>) { } = cookies const ua = parseUA(BING_UA) - const { _U, MUID } = parseCookies(extraHeadersFromCookie({ + const { _U } = parseCookies(extraHeadersFromCookie({ BING_HEADER, BING_HEADER0, ...cookies, - }).cookie, ['MUID']) + }).cookie, []) return { 'x-forwarded-for': BING_IP || randomIP(), @@ -179,7 +179,7 @@ export function mockUser(cookies: Partial<{ [key: string]: string }>) { 'User-Agent': ua!, 'x-ms-useragent': 'azsdk-js-api-client-factory/1.0.0-beta.1 core-rest-pipeline/1.10.3 OS/Win32', 'referer': 'https://www.bing.com/search?showconv=1&sendquery=1&q=Bing%20AI&form=MY02CJ&OCID=MY02CJ&OCID=MY02CJ&pl=launch', - cookie: `_U=${_U || defaultUID}; MUID=${MUID || randomString(32)}`, + cookie: `_U=${_U || defaultUID}; MUID=${randomString(32)}`, } }