From 7a05625aee044388e4a325653521b77bc282fcdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=B4=E5=A4=A9?= Date: Wed, 4 Mar 2026 14:09:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20patch=5Fgateway=5Forigins=20=E7=A7=BB?= =?UTF-8?q?=E8=87=B3=20paired=20=E6=A3=80=E6=9F=A5=E5=89=8D=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E9=85=8D=E5=AF=B9=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E8=B7=B3=E8=BF=87=E5=86=99=E5=85=A5=20origins=20=E7=9A=84=20bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/commands/pairing.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src-tauri/src/commands/pairing.rs b/src-tauri/src/commands/pairing.rs index 4fdd17c..a2ce2c6 100644 --- a/src-tauri/src/commands/pairing.rs +++ b/src-tauri/src/commands/pairing.rs @@ -44,6 +44,9 @@ pub fn auto_pair_device() -> Result { serde_json::json!({}) }; + // 无论是否已配对,都确保 gateway.controlUi.allowedOrigins 已写入 + patch_gateway_origins(); + // 检查设备是否已配对 if paired.get(&device_id).is_some() { return Ok("设备已配对".into());