tRPC Cors Authentication Error
Hey, I was mainly looking to enable CORS locally for calling my tRPC endpoints in localhost:3000 (NextJS) from localhost:6006 (Storybook)
I followed this doc https://trpc.io/docs/cors and this section of the advanced usage to enable cors https://trpc.io/docs/api-handler#advanced-usage but I'm getting the following error
What I'm looking to do is call my authed endpoints on localhost:3000 from localhost:6000, has anyone had experience with this?
Relevant repository code:
Next - https://github.com/AnswerOverflow/AnswerOverflow/tree/message-result-page/apps/nextjs
Storybook - https://github.com/AnswerOverflow/AnswerOverflow/tree/message-result-page/packages/ui
I followed this doc https://trpc.io/docs/cors and this section of the advanced usage to enable cors https://trpc.io/docs/api-handler#advanced-usage but I'm getting the following error
CORS No Allow Credentials - Removing the credentials: include fixes this https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials however then I'm unable to use authenticated endpoints What I'm looking to do is call my authed endpoints on localhost:3000 from localhost:6000, has anyone had experience with this?
Relevant repository code:
Next - https://github.com/AnswerOverflow/AnswerOverflow/tree/message-result-page/apps/nextjs
Storybook - https://github.com/AnswerOverflow/AnswerOverflow/tree/message-result-page/packages/ui