First webui commit

This commit is contained in:
Marco Realacci 2022-12-09 03:53:16 +01:00
parent e38f5d08ab
commit c4611b92f8
2011 changed files with 30382 additions and 1874 deletions

View file

@ -5,4 +5,18 @@ const instance = axios.create({
timeout: 1000 * 5
});
export default instance;
//axios.interceptors.request.use(function (config) {
// const token = sessionStorage.getItem('token');
// if (!token) return config;
// config.headers.Authorization = "Bearer " + token;
// return config;
//});
const updateToken = () => {
instance.defaults.headers.common['Authorization'] = 'Bearer ' + sessionStorage.getItem('token');
}
export {
instance as axios,
updateToken as updateToken,
}