feat: enable local network access on macOS #1178

This commit is contained in:
kangfenmao
2025-02-08 10:57:30 +08:00
parent fb8baa5c09
commit f8d9318dbc
2 changed files with 10 additions and 0 deletions
+6
View File
@@ -16,6 +16,12 @@ if (!app.requestSingleInstanceLock()) {
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
if (process.platform === 'darwin') {
// Enable local network access
app.commandLine.appendSwitch('enable-local-network-access')
}
app.whenReady().then(async () => {
await updateUserDataPath()