From 48e3f5120e4fbc2b985905ca0a427bd9ba00e6bb Mon Sep 17 00:00:00 2001 From: zjdndjf <186369260+zjdndjf@users.noreply.github.com> Date: Thu, 9 Apr 2026 23:03:15 +0800 Subject: [PATCH] fix: remove empty 'lan-allowed-ips' to avoid LAN access anomalies --- src/main/core/factory.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/core/factory.ts b/src/main/core/factory.ts index dbf8ffa..a674372 100644 --- a/src/main/core/factory.ts +++ b/src/main/core/factory.ts @@ -144,6 +144,10 @@ export async function generateProfile(): Promise { if (['info', 'debug'].includes(profile['log-level']) === false) { profile['log-level'] = 'info' } + // 删除空的局域网允许列表,避免局域网访问异常 + if (!profile['lan-allowed-ips']?.length) { + delete profile['lan-allowed-ips'] + } runtimeConfig = profile runtimeConfigStr = stringify(profile) if (diffWorkDir) {