vue-mc
vue-mc copied to clipboard
Define global Axios configuration
I use vue-mc with NuxtJS and Symfony as my Backend. Authentication with json_login. To make the login/auth work, I have to extend the axios config for every request with
export default function ({ $axios }) {
$axios.onRequest((config) => {
config.withCredentials = true
return config
})
}
Also, i defined the base url of my API endpoint in my NuxtJS config
axios: {
baseURL: process.env.API_BASE_URL || 'http://local.dev:8000',
},
Both is ignored by vue-mc (although vue-mc seems to use axios internally)
Maybe this one helps: https://github.com/FiguredLimited/vue-mc/issues/23