diff --git a/src/boot/axios.js b/src/boot/axios.js index b923ccdc..bc540d23 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -3,6 +3,7 @@ import { Connection } from '../js/db/connection'; import { useUserStore } from 'stores/user'; import axios from 'axios'; import useNotify from 'src/composables/useNotify.js'; +import { useAppStore } from 'src/stores/app'; const { notify } = useNotify(); // Be careful when using SSR for cross-request state pollution @@ -37,9 +38,12 @@ const onResponseError = error => { export default boot(({ app }) => { const userStore = useUserStore(); + const appStore = useAppStore(); + console.log('appStore', appStore); function addToken(config) { if (userStore.token) { config.headers.Authorization = userStore.token; + config.headers['Accept-Language'] = appStore.siteLang; } return config; }