Back

CORS error fetching from React to Appwrite Funtions

  • 0
  • Functions
  • Web
eliuddy
15 Aug, 2024, 19:11

Is true that from LOCALHOST I can not make a request to Appwrite functions? 🥲

TL;DR
Developers are facing a CORS error when fetching from React to Appwrite Functions. They are struggling to send their request as RAW JSON like in Postman. They are also confused about "sending it at the end" and "manually handling the CORS stuff." Additionally, they are questioning if it's true that requests from localhost to Appwrite functions are not allowed. Solution: Address the CORS issue by manually handling the CORS configuration. Consider the placement of the request in the code to ensure the OPTIONS request hits it.
Steven
15 Aug, 2024, 19:21

you can, but you need to manually the CORS stuff. sending it at the end like the code you shared might not work because the OPTIONS request may not be hitting that

eliuddy
15 Aug, 2024, 19:49

Thanks for your response bro... When you say: "Sending it at the end".... What you mean bro? 😅

eliuddy
15 Aug, 2024, 19:53

In Postman it is working fine. What I dont understand is how to send it as RAW JSON like in Postman 😅

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more