mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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:
parent
7f4e6a9d51
commit
80b5d5c029
2
ui/public/index.html
vendored
2
ui/public/index.html
vendored
@ -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);
|
||||
|
||||
@ -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)))
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user