Commit 2f73b6b1 authored by tom's avatar tom

change credentials option

parent 6760a274
...@@ -19,7 +19,7 @@ export default function useFetchProfileInfo() { ...@@ -19,7 +19,7 @@ export default function useFetchProfileInfo() {
return useQuery<unknown, Error, UserInfo>([ QueryKeys.profile ], async() => { return useQuery<unknown, Error, UserInfo>([ QueryKeys.profile ], async() => {
const url = new URL(`${ appConfig.api.basePath }/api/account/v1/user/info`, appConfig.api.endpoint); const url = new URL(`${ appConfig.api.basePath }/api/account/v1/user/info`, appConfig.api.endpoint);
return fetch(url.toString(), { credentials: appConfig.isDev ? 'include' : 'same-origin' }); return fetch(url.toString(), { credentials: 'include' });
}, { }, {
refetchOnMount: false, refetchOnMount: false,
enabled: Boolean(cookies.get(cookies.NAMES.API_TOKEN)), enabled: Boolean(cookies.get(cookies.NAMES.API_TOKEN)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment