Skip to content

Commit

Permalink
fix: 去除 _U 与 MUID 的绑定关系
Browse files Browse the repository at this point in the history
  • Loading branch information
weaigc committed Nov 11, 2023
1 parent de76c4c commit ed39832
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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)}`,
}
}

Expand Down

0 comments on commit ed39832

Please sign in to comment.