fix(desktop): 修复桌面端 API 连接问题
- API 客户端使用完整后端 URL (localhost:3000) - 添加 tauri-plugin-http 支持外部 HTTP 请求 - 配置 CSP 允许连接 localhost - 同步 useChat hook 修复 WebSocket 错误处理
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2/capability",
|
||||
"identifier": "default",
|
||||
"description": "Default capabilities for the application",
|
||||
"windows": ["*"],
|
||||
"permissions": [
|
||||
"core:default",
|
||||
"shell:default",
|
||||
"fs:default",
|
||||
"dialog:default",
|
||||
{
|
||||
"identifier": "http:default",
|
||||
"allow": [
|
||||
{ "url": "http://localhost:*/*" },
|
||||
{ "url": "http://127.0.0.1:*/*" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user