I'm trying to make axios working with a request interceptor. However
before a request is made the interceptor is not triggered. What could be going wrong here? I've red already a lot about this problem but not
found a solution so far. Could use some help here! This is my code:
import VueRouter from 'vue-router';
import Login from './components/Login.vue'
import Home from './components/Home.vue'
import axios from 'axios';
window.Vue = require('vue');
window.axios = axios.create({
baseURL: 'http://localhost:8080',
timeout: 10000,
params: {} // do not remove this, its added to add params later in the config
});
Vue.use(VueRouter);
// Check the user's auth status when the app starts
// auth.checkAuth()<