Skip to content

Commit 6783bc5

Browse files
committed
fix: ensure request headers are properly passed
Closes #550
1 parent deac564 commit 6783bc5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/runtime/plugin.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ export default defineNuxtPlugin(() => {
102102
}
103103

104104
if (reqOpts?.token) { delete reqOpts.token }
105-
return defu(reqOpts, req)
105+
return defu(reqOpts, req, {
106+
headers: {
107+
'Content-Type': 'application/json',
108+
Accept: 'application/graphql-response+json, application/json'
109+
}
110+
})
106111
},
107112
...v?.fetchOptions
108113
})

0 commit comments

Comments
 (0)