Closed HimansuWebCoder closed 1 month ago
Hi @HimansuWebCoder, Can you please share your cors policy, and your frontend headers
Sure, I set my headers and this is correct application/json I set, Isn't it. But this issue arising again and again.
This is the issue: Access to fetch at 'https://66dae132f47a05d55be64eb1.mockapi.io/api/v1/todos/10' from origin 'null' has been blocked by CORS policy: Method patch is not allowed by Access-Control-Allow-Methods in preflight response.
What's the CORS_ORIGIN
env var value in your .env?
When updated my todo list with patch method this showed me. Solve the Access-Control-Allow-Methods issue. Why this issue came. please solve this.
Access to fetch at 'https://api.freeapi.app/api/v1/todos/66dad45997bedfaf8fdcc000' from origin 'http://localhost:8080' has been blocked by CORS policy: Method patch is not allowed by Access-Control-Allow-Methods in preflight response.