the complete was Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.jikan.moe/v3 . (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
i want to create a website of anime content and i want to fetch the data from this api address jaikan api i use react js to create this website and i write this code.
var animeData;
var apiUrl = "https://api.jikan.moe/v3";
function getData(api){
fetch(api).then((res) => res.json().then((data) => animeData = data));
}
getData(apiUrl);
and i run the react server bu simple typing npm start and then my server was started and in the console i got error
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.jikan.moe/v3 . (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
have any solution please help..