fix: remove empty 'lan-allowed-ips' to avoid LAN access anomalies

This commit is contained in:
zjdndjf 2026-04-09 23:03:15 +08:00
parent 1b96e07b65
commit 48e3f5120e
No known key found for this signature in database

View File

@ -144,6 +144,10 @@ export async function generateProfile(): Promise<string | undefined> {
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) {