TRPCError: Missing content-type header
Hi, i haven't been using trpc in a while, i'm trying o setup TRPC on a fastify backend and react frontend.
I followed the example from the doc but when react tries to fetchs some data i get the following error:
Checking at the borwser network i see it is requesting the url: http://localhost:3000/trpc/test?batch=1&input=%7B%7D and i if i go to that URL i get back the data correctly.
Any idea of what could be the problem?
I followed the example from the doc but when react tries to fetchs some data i get the following error:
Checking at the borwser network i see it is requesting the url: http://localhost:3000/trpc/test?batch=1&input=%7B%7D and i if i go to that URL i get back the data correctly.
Any idea of what could be the problem?
Solution
Right after asking the question I found the problem. It something that has to do with CORS. I solved it using vite proxy to forward the request to the server and now everything works as expected