You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble using the API at all, due to CORS restrictions. All I tried to do was clone the repo, add my API key, and open the test.html page. But the result is just a bunch of errors like
XMLHttpRequest cannot load https://freesound.org/apiv2/search/text/?&page=1&filter=tag:tenuto%20durati…%2015.0]&sort=rating_desc&fields=id,name,url&query=violoncello&format=json. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
I am however able to use the api if I build a request using Postman, for what it's worth.
The text was updated successfully, but these errors were encountered:
You are probably opening the file locally, Browsers block any AJAX to external pages when a page is opened locally, just upload it to a webspace and take it from there.
You may then still need to configure the CORS Headers, see w3 wiki
I'm having trouble using the API at all, due to CORS restrictions. All I tried to do was clone the repo, add my API key, and open the test.html page. But the result is just a bunch of errors like
I am however able to use the api if I build a request using Postman, for what it's worth.
The text was updated successfully, but these errors were encountered: