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: {
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;

View File

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