mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-26 06:08:38 +01:00
Configure baseUrl option for axios only once
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import Vue from 'vue'
|
||||
import axios from 'axios'
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
@@ -10,7 +9,6 @@ const _axios = axios.create()
|
||||
_axios.interceptors.request.use(
|
||||
function (config) {
|
||||
// Do something before request is sent
|
||||
config.baseURL = Vue.prototype.$config.API_BASE_URL
|
||||
if (store.state.auth.isAuthenticated) {
|
||||
config.headers['Accept-Language'] = store.state.auth.authUser.language
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user