diff --git a/src/api/index.js b/src/api/index.js index 81a69f4e..ca742276 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -18,6 +18,9 @@ export const $axios2 = axios.create({ const $auth = localStorageCache(0, 'app').get('auth') const initUser = $auth ? $auth.data : undefined if (initUser) { $axios2.defaults.headers.common['Authorization'] = `BEARER ${initUser.token}` } + +$axios2.defaults.headers.common['api-key'] = process.env.VUE_APP_API_KEY || config.VUE_APP_API_KEY + /* provided methods */ const $http = (path, opts, handleErrors) => { opts = opts || {}