From f1705ab4c3075f00031a216aa720d00de89f0e34 Mon Sep 17 00:00:00 2001 From: CeruleanRed Date: Fri, 8 Nov 2024 09:10:16 +0100 Subject: [PATCH] Use 'no-cache' when fetching server data --- native/find-webclient.js | 4 ++-- native/jmpUpdatePlugin.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/native/find-webclient.js b/native/find-webclient.js index c236c08b..b94fc80d 100644 --- a/native/find-webclient.js +++ b/native/find-webclient.js @@ -7,9 +7,9 @@ async function tryConnect(server) { } serverBaseURL = server.replace(/\/+$/, ""); const url = serverBaseURL + "/System/Info/Public"; - const response = await fetch(url); + const response = await fetch(url, { cache: 'no-cache' }); if (response.ok && (await response.json()).Id) { - const htmlResponse = await fetch(server); + const htmlResponse = await fetch(server, { cache: 'no-cache' }); if (!htmlResponse.ok) { throw new Error("Status not ok"); } diff --git a/native/jmpUpdatePlugin.js b/native/jmpUpdatePlugin.js index 5147c480..d85847ec 100644 --- a/native/jmpUpdatePlugin.js +++ b/native/jmpUpdatePlugin.js @@ -12,7 +12,7 @@ class jmpUpdatePlugin { // Windows (and possibly macOS) don't ship with SSL in QT...... // So we get to do a full request to GitHub here :( const checkUrl = "https://github.com/jellyfin/jellyfin-media-player/releases/latest"; - url = (await fetch(checkUrl)).url; + url = (await fetch(checkUrl, { cache: 'no-cache' })).url; } const urlSegments = url.split("/");