adrianhajdin/project_ai_mern_image_generation

CORS Error

soumizde opened this issue · 2 comments

Screenshot (92)

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?

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