Repository navigation
v2.4.2
- Fix multiple
NewsAPIinstances overwriting each other's API key and CORS proxy URL. - Stop sending the
Access-Control-Allow-Originheader andmode: 'cors'with requests.Access-Control-Allow-Originis a response header, and sending it caused browsers to make CORS preflight requests that News API rejects. - Non-JSON responses (e.g. an HTML error page from a proxy) are now reported as a
NewsAPIErrorinstead of a JSON parse error. NewsAPIErrornow hascodeandstatusproperties, and is exported asNewsAPI.NewsAPIError.- Update dependencies to resolve security vulnerabilities.
No breaking changes: existing code using 2.4.1 keeps working.