Back

hey ! it shows me this error

  • 0
  • Web
YaHalaulau
25 Jun, 2024, 13:40

Access to XMLHttpRequest at 'http://localhost:5000/registerclient' from origin 'http://localhost:5173' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'http://localhost:5000' that is not equal to the supplied origin. please help

TL;DR
Error message indicates a CORS policy issue due to mismatch in origins. Set 'Access-Control-Allow-Origin' header to match 'http://localhost:5173'. Update it in backend code to resolve the problem.
YaHalaulau
25 Jun, 2024, 13:50

im trying to do one signup page for clients and another page for babysitters, i did 2 schemas and i connected to the backend, i did authRoute page in backend and inside i wrote router.use(cors({credentials:true, origin: "http://localhost:5000"})

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