Skip to content

Commit dae4afe

Browse files
committed
fix(headers): 更新 X-FE-Version 标头,修复客户端校验426错误
1 parent 2786ee7 commit dae4afe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/core/zai_transformer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def get_zai_dynamic_headers(chat_id: str = "") -> Dict[str, str]:
4242
if "Chrome/" in user_agent:
4343
try:
4444
chrome_version = user_agent.split("Chrome/")[1].split(".")[0]
45+
sec_ch_ua = f'"Google Chrome";v="{chrome_version}", "Not_A_Brand";v="8", "Chromium";v="{chrome_version}"'
4546
except:
4647
pass
4748

@@ -66,8 +67,8 @@ def get_zai_dynamic_headers(chat_id: str = "") -> Dict[str, str]:
6667
"Cache-Control": "no-cache",
6768
# UA and app-specific headers
6869
"User-Agent": user_agent,
69-
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
70-
"X-FE-Version": "prod-fe-1.0.79",
70+
"Accept-Language": "zh-CN",
71+
"X-FE-Version": "prod-fe-1.0.97",
7172
"Origin": "https://chat.z.ai",
7273
}
7374

0 commit comments

Comments
 (0)