diff --git a/auth/src/axios.ts b/auth/src/axios.ts index f47154b..11b7a66 100644 --- a/auth/src/axios.ts +++ b/auth/src/axios.ts @@ -5,6 +5,9 @@ export function attachAuthInterceptors(client: AxiosInstance) { client.interceptors.request.use((config) => { const token = tokenStore.get(); if (token) { + if (!config.headers) { + (config as any).headers = {}; + } config.headers.Authorization = `Bearer ${token}`; } return config;