CORS Error
soumizde opened this issue · 2 comments
soumizde commented
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?
adnan179 commented
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
soumizde commented
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