From fc49bb93a7d30a3b5abe649d4fc3593e1f6e6204 Mon Sep 17 00:00:00 2001 From: alwaysmesmerizingyou Date: Fri, 4 Sep 2026 22:52:34 -0700 Subject: [PATCH] allow localhost subresource loads in WKWebView --- package.json | 4 ++-- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/Info.plist | 21 +++++++++++++++++++++ src-tauri/tauri.conf.json | 21 ++++++++++++++++++--- 5 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 src-tauri/Info.plist diff --git a/package.json b/package.json index 86a7d1a..b7d8f9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vyla-home", - "version": "1.1.23", + "version": "1.1.24", "description": "Vyla Home Desktop App Launcher", "main": "main.js", "scripts": { @@ -54,4 +54,4 @@ "installerHeaderIcon": "build/icon.ico" } } -} \ No newline at end of file +} diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 47df364..1b2a056 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4222,7 +4222,7 @@ dependencies = [ [[package]] name = "vyla-home" -version = "1.1.23" +version = "1.1.24" dependencies = [ "base64 0.22.1", "serde", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 3df2a68..c4d6524 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vyla-home" -version = "1.1.23" +version = "1.1.24" description = "Vyla Home Desktop App Launcher" edition = "2021" diff --git a/src-tauri/Info.plist b/src-tauri/Info.plist new file mode 100644 index 0000000..66143f2 --- /dev/null +++ b/src-tauri/Info.plist @@ -0,0 +1,21 @@ + + + + + NSAppTransportSecurity + + NSAllowsLocalNetworking + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + NSIncludesSubdomains + + + + + + \ No newline at end of file diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 469c312..dc14539 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "Vyla Home", - "version": "1.1.23", + "version": "1.1.24", "identifier": "com.vyla.home", "build": { "frontendDist": "../ui" @@ -9,7 +9,21 @@ "app": { "withGlobalTauri": true, "security": { - "csp": null + "csp": "default-src 'self' http://localhost:4890 http://127.0.0.1:4890; script-src 'self' 'unsafe-inline' 'unsafe-eval' http://localhost:4890 http://127.0.0.1:4890 https://esm.sh; style-src 'self' 'unsafe-inline' http://localhost:4890 http://127.0.0.1:4890; img-src 'self' data: https: http://localhost:4890 http://127.0.0.1:4890; font-src 'self' data: http://localhost:4890 http://127.0.0.1:4890; connect-src 'self' http://localhost: http://127.0.0.1:", + "dangerousRemotedomainIpcAccess": [ + { + "domain": "localhost", + "windows": [ + "main" + ], + "enableTauriApi": true, + "plugins": [ + "shell", + "process", + "opener" + ] + } + ] } }, "bundle": { @@ -23,7 +37,8 @@ "icons/icon.ico" ], "macOS": { - "exceptionDomain": "localhost" + "exceptionDomain": "localhost", + "infoPlist": "../Info.plist" }, "windows": { "webviewInstallMode": {