xergic
Forward cookie to SSR useFetch on Cloudflare Workers
Hi, I'm deploying my Nuxt app to CF Workers and need to forward auth cookie to my API on SSR using
useFetch
.
useCustomFetch composable looks something like this (from the docs: https://nuxt.com/docs/getting-started/data-fetching#passing-headers-and-cookies):
The cookie is set on client side.
It works when using client side fetch but not on SSR... I tried it with setting credentials: 'include'
in useFetch options, but that does not work on CF Workers as this option is not implemented and apparently not needed (more on that here: https://github.com/cloudflare/workers-sdk/issues/2514).
Am I doing it wrong?
Any help would be greatly appreciated.1 replies