mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-17 07:37:24 -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;
|
let waitLoops = 0;
|
||||||
while (userDecision === null) {
|
while (userDecision === null) {
|
||||||
if (!tempServer && waitLoops > 400) {
|
if (waitLoops > 24000) {
|
||||||
|
debugLog("Update decision timed out after 10 minutes, defaulting to skip.");
|
||||||
userDecision = false;
|
userDecision = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"app": {
|
"app": {
|
||||||
"withGlobalTauri": true,
|
"withGlobalTauri": true,
|
||||||
"security": {
|
"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": {
|
"bundle": {
|
||||||
@@ -45,4 +45,4 @@
|
|||||||
"../node_modules/**/*"
|
"../node_modules/**/*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -605,7 +605,10 @@ void main() {
|
|||||||
btnYes.addEventListener("click", () => {
|
btnYes.addEventListener("click", () => {
|
||||||
if (actionsEl) actionsEl.style.display = "none";
|
if (actionsEl) actionsEl.style.display = "none";
|
||||||
setStatus("Starting update installation...");
|
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", () => {
|
btnNo.addEventListener("click", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user