Problem with CORS policy, when making a request to https://newsapi.org [duplicate]
问题 This question already has answers here : No 'Access-Control-Allow-Origin' header is present on the requested resource—when trying to get data from a REST API (10 answers) Closed 3 months ago . I have been running news api on my website and testing in on my computer by dragging the file into the web browser, the url would show up like that file:///C: . Then I would upload any changes to my GitHub repository and run it on Github pages https://name.github.io/repository/ . Everything was working