mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-04-01 01:21:24 +08:00
feat: add OpenClaw User-Agent toggle, default off
Add a switch in the OpenClaw provider form to optionally send a browser User-Agent header. The toggle defaults to off — only providers that explicitly include headers in their preset or config will have it enabled. Remove the previous auto-injection logic that force-added User-Agent on every preset load and new provider creation.
This commit is contained in:
@@ -100,6 +100,8 @@ pub struct OpenClawProviderConfig {
|
||||
pub api: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub models: Vec<OpenClawModelEntry>,
|
||||
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
|
||||
pub headers: HashMap<String, String>,
|
||||
#[serde(flatten)]
|
||||
pub extra: HashMap<String, Value>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user