Skip to content

Commit

Permalink
fix(auth): fix failed token refresh on SSR (Cookie mode)
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed Dec 29, 2024
1 parent 3638f81 commit b533837
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/runtime/plugins/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ export default defineNuxtPlugin({
const fetch = $fetch.create({
onRequest({ options }) {
if (import.meta.server) {
options.headers = {
...options.headers,
...reqHeaders,
}
options.headers.set('cookie', reqHeaders.cookie ?? '')
}
},
onResponse({ response }) {
Expand Down

0 comments on commit b533837

Please sign in to comment.