Calling OpenWeatherMap API is blocked due to CORS header ‘Access-Control-Allow-Origin’ missing

Here’s an explanation of why this happens.

The tl;dr is to use a CORS proxy for your requests. Prepend https://cors-anywhere.herokuapp.com/ to your API’s URL.

https://cors-anywhere.herokuapp.com/http://api.openweathermap.org...
6 Likes