mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 21:30:17 +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:
@@ -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