Skip to content

Commit af54fe5

Browse files
authored
Merge pull request #106 from wafflestudio/105-bug-fix-cookie
[HOTFIX] request cookie 및 retry 로직 수정
2 parents 8f72334 + 651154d commit af54fe5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/shared/api/ky.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,14 @@ function getDurationMs(options: NormalizedOptions) {
4444

4545
export const instance = ky.create({
4646
prefixUrl: import.meta.env.VITE_API_URL,
47-
credentials: 'include',
4847
timeout: 10000,
4948
headers: {
5049
'Content-Type': 'application/json',
5150
},
5251
retry: {
5352
limit: 2,
5453
methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'],
55-
statusCodes: [401, 403, 408, 429, 500, 502, 503, 504],
54+
statusCodes: [408, 429, 500, 502, 503, 504],
5655
},
5756
hooks: {
5857
beforeRequest: [

src/shared/auth/useCurrentUser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function useCurrentUser() {
88
return useQuery({
99
queryKey: currentUserQueryKey,
1010
queryFn: getCurrentUser,
11-
retry: false,
11+
retry: 1,
1212
staleTime: 5 * 60 * 1000,
1313
})
1414
}

0 commit comments

Comments
 (0)