mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-09 19:57:20 -05:00
allow localhost connections for update service in CSP
This commit is contained in:
3
main.js
3
main.js
@@ -376,7 +376,8 @@ async function start() {
|
||||
|
||||
let waitLoops = 0;
|
||||
while (userDecision === null) {
|
||||
if (!tempServer && waitLoops > 400) {
|
||||
if (waitLoops > 24000) {
|
||||
debugLog("Update decision timed out after 10 minutes, defaulting to skip.");
|
||||
userDecision = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"app": {
|
||||
"withGlobalTauri": true,
|
||||
"security": {
|
||||
"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:"
|
||||
"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:*"
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
@@ -45,4 +45,4 @@
|
||||
"../node_modules/**/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -605,7 +605,10 @@ void main() {
|
||||
btnYes.addEventListener("click", () => {
|
||||
if (actionsEl) actionsEl.style.display = "none";
|
||||
setStatus("Starting update installation...");
|
||||
fetch("http://127.0.0.1:4891/update/yes", { method: "POST" }).catch(() => { });
|
||||
fetch("http://127.0.0.1:4891/update/yes", { method: "POST" }).catch((err) => {
|
||||
setStatus("Failed to reach update service. Retrying...", "#fca5a5");
|
||||
showDebug(err.message);
|
||||
});
|
||||
});
|
||||
|
||||
btnNo.addEventListener("click", () => {
|
||||
|
||||
Reference in New Issue
Block a user