tRPC Call To Server
On the mobile version of my app, in NextJS, the build has to be static so I have to use my hosted web version ass the server url, but when it makes requests it says stuff like no query procedure found, whereas in the web version the request works just fine, I think it's because the static version of the app doesn't request with any cookies. How can I solve this?
2 Replies
Send cookies cross-origin | tRPC
If your API resides on a different origin than your front-end and you wish to send cookies to it, you will need to enable CORS on your server and send cookies with your requests by providing the option {credentials: "include"} to fetch.
me when i dont read docs: 🧍♂️
still getting
response body is not available to scripts (Reason: CORS No Allow Credentials)
😔
found the answer here https://canary.discord.com/channels/867764511159091230/1067565106080264232/1067743471554809897