This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch 4.20 in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push: new 80b5d5c0298 ui: do not cache config.json and locale files (#10497) 80b5d5c0298 is described below commit 80b5d5c02984dcfd1aa589275f0695c3aa8c1c22 Author: Rohit Yadav <rohit.ya...@shapeblue.com> AuthorDate: Wed Mar 5 07:09:13 2025 +0530 ui: do not cache config.json and locale files (#10497) This will add a randomised timestamp when fetching config.json and locale i18n files, to avoid using cached resources. Fixes #9985 Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com> --- ui/public/index.html | 2 +- ui/src/locales/index.js | 2 +- ui/src/main.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/public/index.html b/ui/public/index.html index 0e6521418cb..b681ad6a902 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -55,7 +55,7 @@ </div> </body> <script type="text/javascript"> - fetch('./config.json') + fetch('./config.json?ts=' + Date.now()) .then(response => response.json()) .then(data => { document.getElementById("favicon").setAttribute("href", data.loginFavicon); diff --git a/ui/src/locales/index.js b/ui/src/locales/index.js index 29c828b6447..6933e05206e 100644 --- a/ui/src/locales/index.js +++ b/ui/src/locales/index.js @@ -39,7 +39,7 @@ export function loadLanguageAsync (lang) { return Promise.resolve(setLanguage(lang)) } - return fetch(`locales/${lang}.json`) + return fetch(`locales/${lang}.json?ts=${Date.now()}`) .then(response => response.json()) .then(json => Promise.resolve(setLanguage(lang, json))) } diff --git a/ui/src/main.js b/ui/src/main.js index 2f1d892fbd8..e22cca334e5 100644 --- a/ui/src/main.js +++ b/ui/src/main.js @@ -54,7 +54,7 @@ vueApp.use(genericUtilPlugin) vueApp.use(extensions) vueApp.use(directives) -fetch('config.json').then(response => response.json()).then(config => { +fetch('config.json?ts=' + Date.now()).then(response => response.json()).then(config => { vueProps.$config = config let basUrl = config.apiBase if (config.multipleServer) {