diff --git a/src/store/modules/config/config.store.js b/src/store/modules/config/config.store.js index a4008a38..541c74e9 100644 --- a/src/store/modules/config/config.store.js +++ b/src/store/modules/config/config.store.js @@ -13,7 +13,7 @@ export default { }, actions: { async fetchConfig({ commit }) { - const url = process.env.API_OVERRIDE || ''; + const url = window.location.origin; const { data } = await axios.get(`${url}/config`); commit('setConfig', data); return data; diff --git a/webapp.js b/webapp.js index 2b6ea1be..834ffeab 100644 --- a/webapp.js +++ b/webapp.js @@ -110,7 +110,12 @@ const app = async (orm) => { details: result, }).end(); }); - root.get('/config', (req, res) => res.send(SettingsHelper())); + root.get('/config', (req, res) => { + res.header('Cache-Control', 'private, no-cache, no-store, must-revalidate'); + res.header('Expires', '-1'); + res.header('Pragma', 'no-cache'); + res.send(SettingsHelper()) + }); root.use('/', express.static(path.join(__dirname, 'dist'))); root.get('*', (req, res) => { console.log('Catch all');