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.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2025-03-05 07:09:13 +05:30 committed by GitHub
parent 7f4e6a9d51
commit 80b5d5c029
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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)))
}

View File

@ -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) {