Closed soumizde closed 1 year ago
use the url "http://localhost:8080/api/v1/post" as it is the url u are using to fetch data as of now, which is from the server
I tried that and I even tried removing the http://localhost:8080 which may sometimes resolve the error. Now I am not getting a CORS error however I still cannot fetch the data
As soon as I am inputting const response = await fetch("https://dalle-arbb.onrender.com/api/v1/post", { method: 'GET', headers: { 'Content-Type': 'application/json', }, }); I am getting a CORS error. How do I fix this?