From abe185494dbcfe7fee9389b97290510a7b8d1cbc Mon Sep 17 00:00:00 2001 From: Anthony Kinsey Date: Fri, 17 Jan 2025 10:36:54 -1000 Subject: [PATCH] feat(api-key): send api key to with requests --- src/api/index.js | 3 +++ 1 file changed, 3 insertions(+) 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 || {}