diff --git a/src/runtime/plugins/apollo.ts b/src/runtime/plugins/apollo.ts index ab41c67..1cbafd9 100644 --- a/src/runtime/plugins/apollo.ts +++ b/src/runtime/plugins/apollo.ts @@ -76,7 +76,7 @@ export default defineNuxtPlugin({ const authLink = setContext((_, { headers }) => { const { accessTokenState, refreshTokenState } = useAuthState(); let token: string; - let cookies: string = headers?.cookies ?? defaultHeaders?.cookies ?? ''; + // let cookies: string = headers?.cookies ?? defaultHeaders?.cookies ?? ''; console.log(defaultHeaders, headers); @@ -88,19 +88,18 @@ export default defineNuxtPlugin({ } } - if (process.client) { - console.log('process.client', cookies); - cookies = document.cookie; - } + // if (process.client) { + // console.log('process.client', cookies); + // cookies = document.cookie; + // } - console.log('cookies', cookies); + // console.log('cookies', cookies); return { headers: { ...headers, ...defaultHeaders, Authorization: token ? `Bearer ${token}` : '', // Token in header - origin: headers.origin ?? defaultHeaders?.origin ?? defaultHeaders?.referer, }, }; });