diff --git a/frontend/src/apis/getApi.ts b/frontend/src/apis/getApi.ts index 83bc0f8b..c3921340 100644 --- a/frontend/src/apis/getApi.ts +++ b/frontend/src/apis/getApi.ts @@ -37,6 +37,7 @@ async function withTokenRefresh(callback: () => Promise): Promise { console.log('AccessToken 만료되어 재요청합니다'); const headers: any = { Authorization: `Bearer ${userToken}` }; + console.log(`Authorization : Bearer ${userToken}`); //새로운 토큰 재발급 userToken = await refreshToken(headers); localStorage.setItem('userToken', userToken); @@ -65,7 +66,9 @@ export const getApi = async (url: string) => { await withTokenRefresh(async () => { const apiUrl = `${DEFAULT_PROD_URL + url}`; const userToken = localStorage.getItem('userToken'); - const headers: any = {}; + const headers: any = { + 'content-type': 'application/json', + }; if (userToken) { headers['Authorization'] = `Bearer ${userToken}`;