From 6805eee5f90564a595b70c9446d75f2c9c5a5375 Mon Sep 17 00:00:00 2001 From: Dock O'Neal Date: Mon, 24 Jun 2024 17:01:55 -0400 Subject: [PATCH] Changing System/Info/Public to no-cache. Prevents from identifying the correct server version during upgrade --- src/components/ConnectionRequired.tsx | 2 +- src/components/router/appRouter.js | 2 +- src/utils/dashboard.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ConnectionRequired.tsx b/src/components/ConnectionRequired.tsx index 8dde8ec1e735..ad2577c5d1b4 100644 --- a/src/components/ConnectionRequired.tsx +++ b/src/components/ConnectionRequired.tsx @@ -83,7 +83,7 @@ const ConnectionRequired: FunctionComponent = ({ if (firstConnection.State === ConnectionState.ServerSignIn) { // Verify the wizard is complete try { - const infoResponse = await fetch(`${firstConnection.ApiClient.serverAddress()}/System/Info/Public`); + const infoResponse = await fetch(`${firstConnection.ApiClient.serverAddress()}/System/Info/Public`, { cache: 'no-cache' }); if (!infoResponse.ok) { throw new Error('Public system info request failed'); } diff --git a/src/components/router/appRouter.js b/src/components/router/appRouter.js index 3b07a5571cf0..f1241c25c289 100644 --- a/src/components/router/appRouter.js +++ b/src/components/router/appRouter.js @@ -388,7 +388,7 @@ class AppRouter { if (firstResult) { if (firstResult.State === ConnectionState.ServerSignIn) { const url = firstResult.ApiClient.serverAddress() + '/System/Info/Public'; - fetch(url).then(response => { + fetch(url, { cache: 'no-cache'}).then(response => { if (!response.ok) return Promise.reject('fetch failed'); return response.json(); }).then(data => { diff --git a/src/utils/dashboard.js b/src/utils/dashboard.js index 393125c6fde3..89c4c406d6d3 100644 --- a/src/utils/dashboard.js +++ b/src/utils/dashboard.js @@ -52,7 +52,7 @@ export async function serverAddress() { console.debug('URL candidates:', urls); const promises = urls.map(url => { - return fetch(`${url}/System/Info/Public`) + return fetch(`${url}/System/Info/Public`, { cache: 'no-cache' }) .then(async resp => { if (!resp.ok) { return;