Skip to content

v2.4.2

Choose a tag to compare

@bzarras bzarras released this 21 Oct 12:24
· 1 commit to master since this release
2b036ad
  1. Fix multiple NewsAPI instances overwriting each other's API key and CORS proxy URL.
  2. Stop sending the Access-Control-Allow-Origin header and mode: 'cors' with requests. Access-Control-Allow-Origin is a response header, and sending it caused browsers to make CORS preflight requests that News API rejects.
  3. Non-JSON responses (e.g. an HTML error page from a proxy) are now reported as a NewsAPIError instead of a JSON parse error.
  4. NewsAPIError now has code and status properties, and is exported as NewsAPI.NewsAPIError.
  5. Update dependencies to resolve security vulnerabilities.

No breaking changes: existing code using 2.4.1 keeps working.