youtube-scrape
youtube-scrape copied to clipboard
Using the API inside other websites has CORS errors
So I'm making a website (a terminal/shell emulator), and I wanted to use your API to get youtube search results, but when using a XMLHttpRequest
, I get in console:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://youtube-scrape.herokuapp.com/api/search?q=search. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
It looks like you need to add the Access-Control-Allow-Origin: *
header to your server, to fix the problem.
But, I understand as well if you don't want me using the API inside my website, because of lots of potential API usage...