Should event: APIevent have client cookies on SSR?
In following code headers only have these
7 Replies
What I am asking, should clients cookies be forwarded to bun?
During SSR API routes won't receive cookies, no, since it's not the client making the request
You need to pass through the cookies manually inside your solid query fetch
use server
functions avoid this since they don't do a server -> server request during SSR, instead they are just called directly, reusing the Request
from the clientBig thanks. Yeah that makes sense. It's kind of like using axios you need to remember to add "usecredentials".
hmm isn't that a client-side cors thing?
Sorry, lol
Got it working, but wanted to see if you recommend some other way to do this
yeah i'd imagine it'd look something like this - though could you call eden inside a server function? you wouldn't have to mess with any of this stuff
eden would need a server-side calling api for that though
I will try that later.