Request data not consistent between createServerData$ and API route
I have a lucia x trpc x solidstart project setup.
TLDR: I'm observing that the
event
passed to my createServerData$
and the event
that is passed to my API handler is different.
Here's my project structure:
Here's how my API handler for trpc has been setup src/routes/trpc/[trpc].ts
The cookie here is logged as {}
On the other hand, in another route, src/routes/(auth)/signin.ts
The console logs out the authentication details.
I'm confused as to why this is the behaviour since I thought both routeData and API routes are accessing the same request
1 Reply
Okay, it seems that the reason for this was because the client headers were not being forwarded over to the trpc endpoint if im understanding right. If that's the case, is there a way to forward headers in my context?