From 681ab38477f4269ee5bb02fa6051abc16159b623 Mon Sep 17 00:00:00 2001 From: afds4567 <33995840+afds4567@users.noreply.github.com> Date: Tue, 19 Sep 2023 20:02:40 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20refreshToken=20api=20=EC=9A=94=EC=B2=AD?= =?UTF-8?q?=EC=8B=9C=20=ED=97=A4=EB=8D=94=EC=97=90=20content-type=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/apis/getApi.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/apis/getApi.ts b/frontend/src/apis/getApi.ts index c3921340..01825583 100644 --- a/frontend/src/apis/getApi.ts +++ b/frontend/src/apis/getApi.ts @@ -36,7 +36,10 @@ async function withTokenRefresh(callback: () => Promise): Promise { if (decodedPayloadObject.exp * 1000 < Date.now()) { console.log('AccessToken 만료되어 재요청합니다'); - const headers: any = { Authorization: `Bearer ${userToken}` }; + const headers: any = { + 'content-type': 'application/json', + Authorization: `Bearer ${userToken}`, + }; console.log(`Authorization : Bearer ${userToken}`); //새로운 토큰 재발급 userToken = await refreshToken(headers);