mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-28 00:35:32 +08:00
feat(proxy): 添加本地代理请求覆盖功能,支持自定义请求头和请求体 (#4589)
* feat(proxy): 添加本地代理请求覆盖功能,支持自定义请求头和请求体 * fix(proxy): harden local request overrides validation * feat(proxy): 添加受保护的本地代理请求头名称验证功能 * fix(i18n): 更新本地代理请求覆盖的错误提示信息格式 --------- Co-authored-by: jason.mei <jason.mei@ucloud.cn>
This commit is contained in:
@@ -171,6 +171,11 @@ export interface CodexChatReasoning {
|
||||
outputFormat?: CodexChatReasoningOutputFormat;
|
||||
}
|
||||
|
||||
export interface LocalProxyRequestOverrides {
|
||||
headers?: Record<string, string>;
|
||||
body?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
// 供应商元数据(字段名与后端一致,保持 snake_case)
|
||||
export interface ProviderMeta {
|
||||
// 自定义端点:以 URL 为键,值为端点信息
|
||||
@@ -219,6 +224,8 @@ export interface ProviderMeta {
|
||||
codexChatReasoning?: CodexChatReasoning;
|
||||
// Custom User-Agent for local proxy routing. Only applied by the local proxy.
|
||||
customUserAgent?: string;
|
||||
// Local proxy request overrides. Only applied by the local proxy after route transforms.
|
||||
localProxyRequestOverrides?: LocalProxyRequestOverrides;
|
||||
// 供应商类型(用于识别 Copilot 等特殊供应商)
|
||||
providerType?: string;
|
||||
// GitHub Copilot 关联账号 ID(旧字段,保留兼容读取)
|
||||
|
||||
Reference in New Issue
Block a user