From 5ad44a216a308322a2723406906c41abed65a794 Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 13 Mar 2026 00:08:22 +0100 Subject: [PATCH] Add explicit cors mode to all pu-saves fetch calls --- game.v2025-07-31.bundle.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/game.v2025-07-31.bundle.js b/game.v2025-07-31.bundle.js index a997cd5..806d0f3 100644 --- a/game.v2025-07-31.bundle.js +++ b/game.v2025-07-31.bundle.js @@ -5881,6 +5881,7 @@ const blob = new Blob([compressed], { type: "application/octet-stream" }); await fetch(`https://pu-saves.burrson.de/saves/${encodeURIComponent(save_name)}`, { method: "POST", + mode: "cors", body: blob, }); n.showToast("Save stored", `"${save_name}" was saved to the server.`, "success"); @@ -5892,7 +5893,7 @@ } static async populateServerSaves() { try { - const res = await fetch("https://pu-saves.burrson.de/saves"); + const res = await fetch("https://pu-saves.burrson.de/saves", { mode: "cors" }); const saves = await res.json(); const select = $("#server-saves-select"); if (!select.length) return; @@ -5910,7 +5911,7 @@ const save_name = $("#server-saves-select").val(); if (!save_name) return; try { - const res = await fetch(`https://pu-saves.burrson.de/saves/${encodeURIComponent(save_name)}`); + const res = await fetch(`https://pu-saves.burrson.de/saves/${encodeURIComponent(save_name)}`, { mode: "cors" }); if (!res.ok) throw "Not found"; const text = await res.text(); if (n.hasScript(text)) throw "Script found!";