bzarras / newsapi

A promise-based node interface for NewsAPI
MIT License
144 stars 39 forks source link

Problem with CORS policy, when making a request to https://newsapi.org #32

Closed onurusluca closed 2 years ago

onurusluca commented 3 years ago

When testing api from localhost, it gives me this error. I tried everything. To duplicate you can just try to call any api any way you want and it will give this error..

Testing on Node.js

Access to fetch at 'https://newsapi.org/v2/everything?q=bitcoin&sources=bbc-news%2Cthe-verge&domains=bbc.co.uk%2C%20techcrunch.com&language=en&sortBy=relevancy&page=2' from origin 'http://localhost:8080' has been blocked by CORS policy: Request header field access-control-allow-origin is not allowed by Access-Control-Allow-Headers in preflight response.

Abban-Fahim commented 3 years ago

Yep same here :(

jmarrr commented 2 years ago

I still get this issue, even with the suggested fix from the readme

onurusluca commented 2 years ago

Closing due to no answer.