mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-31 00:10:22 +08:00
fix: include headers when importing MCP server configurations (#7944)
- Add missing headers field to newServer object creation in AddMcpServerModal.tsx - Update streamableHttp JSON example to show headers format - Fixes issue where Content-Type and Authorization headers were not imported Fixes #7932 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
8fd59e89de
commit
4f7ca3ede8
@ -44,7 +44,11 @@ const initialJsonExample = `// 示例 JSON (stdio):
|
||||
// "mcpServers": {
|
||||
// "streamable-http-example": {
|
||||
// "type": "streamableHttp",
|
||||
// "url": "http://localhost:3001"
|
||||
// "url": "http://localhost:3001",
|
||||
// "headers": {
|
||||
// "Content-Type": "application/json",
|
||||
// "Authorization": "Bearer your-token"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@ -102,7 +106,8 @@ const AddMcpServerModal: FC<AddMcpServerModalProps> = ({ visible, onClose, onSuc
|
||||
provider: serverToAdd!.provider,
|
||||
providerUrl: serverToAdd!.providerUrl,
|
||||
tags: serverToAdd!.tags,
|
||||
configSample: serverToAdd!.configSample
|
||||
configSample: serverToAdd!.configSample,
|
||||
headers: serverToAdd!.headers || {}
|
||||
}
|
||||
|
||||
onSuccess(newServer)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user