Fixed config and probably autojoin

This commit is contained in:
Sam 2019-07-07 17:27:40 +10:00
parent 0fefb96a43
commit ad1a824f27
2 changed files with 7 additions and 2 deletions

View File

@ -13,7 +13,7 @@ export default {
}, },
actions: { actions: {
async fetchConfig({ commit }) { async fetchConfig({ commit }) {
const url = process.env.API_OVERRIDE || ''; const url = window.location.origin;
const { data } = await axios.get(`${url}/config`); const { data } = await axios.get(`${url}/config`);
commit('setConfig', data); commit('setConfig', data);
return data; return data;

View File

@ -110,7 +110,12 @@ const app = async (orm) => {
details: result, details: result,
}).end(); }).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.use('/', express.static(path.join(__dirname, 'dist')));
root.get('*', (req, res) => { root.get('*', (req, res) => {
console.log('Catch all'); console.log('Catch all');