mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-06-16 13:34:04 +08:00
fix: omit customUserAgent when provider category is official
Stale custom UA values from non-official presets were persisted even after switching to an official preset, silently altering request headers.
This commit is contained in:
committed by
Jason
Unverified
parent
ff706e9e96
commit
25983f3420
@@ -1391,7 +1391,7 @@ function ProviderFormFull({
|
||||
? normalizeCodexChatReasoningForSave(codexChatReasoning)
|
||||
: undefined,
|
||||
customUserAgent:
|
||||
appId === "claude" || appId === "codex"
|
||||
(appId === "claude" || appId === "codex") && category !== "official"
|
||||
? customUserAgent.trim() || undefined
|
||||
: undefined,
|
||||
testConfig: testConfig.enabled ? testConfig : undefined,
|
||||
|
||||
Reference in New Issue
Block a user