mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-27 19:30:15 +08:00
根本原因:Gateway WebSocket 服务检查 HTTP Origin 头,Tauri 应用的 origin (tauri://localhost / https://tauri.localhost) 不在 gateway.controlUi.allowedOrigins 白名单,导致 code 1008 拒绝握手。 修复内容: - pairing.rs: auto_pair_device 新增 patch_gateway_origins(),在写入 paired.json 的同时将 tauri://localhost 和 https://tauri.localhost 写入 openclaw.json gateway.controlUi.allowedOrigins - chat-debug.js: fixPairing 流程补充 origins 写入提示;success 后 触发主 wsClient.reconnect() 让主界面恢复正常;修复诊断建议去除 重复条件,合并 origin/端口 两种可能原因 - chat-debug.js: testWebSocket 1008 关闭时给出明确原因和解决方法 - ws-client.js: onclose 1008 时自动触发 _autoPairAndReconnect() 而非普通重连,实现主应用自愈