Skip to content

Commit

Permalink
Changing System/Info/Public to no-cache. Prevents from identifying th…
Browse files Browse the repository at this point in the history
…e correct server version during upgrade
  • Loading branch information
Doxterpepper committed Jun 24, 2024
1 parent 2cbc9e4 commit 67e043b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/ConnectionRequired.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
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');
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/router/appRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 67e043b

Please sign in to comment.