Fetch json api blocked by cors

http://music-api.great-site.net/

cors

so i make json api, when i fetch in another web i get this error. i already set the header and htaccsess. please give me solution

Hi and welcome to the forum! Seems like those errors are caused by our security system, which is explained on this article:

7 Likes

so we cant to fetch from infinityfree host?

In short: you can’t fetch data from an API hosted on a different subdomain on free hosting, but you can fetch it if you host the API on the domain where you’re making the request (AJAX requests can only be made by the same (sub)domain), I think.

3 Likes

i see, thanks for the explanation

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.