Netlify making an HTTPS request to an HTTP one

Solution for Netlify making an HTTPS request to an HTTP one
is Given Below:

In my Netlify function, I have the following API call:

const response = await axios.get('https://api.openweathermap.org/data/2.5/weather');

But then I deploy it to the site, in the console the browser says:

Blocked loading mixed active content

I’ve done my research, and it seems that this happens when you make an HTTP request over an HTTPS site, but that request says HTTPS explicitly.

Also, when I run the project locally, it works perfectly.

Edit: Here’s the production link and Here’s the repository

Try adding this meta tag <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> With this header set on a domain example.com that wants to migrate from HTTP to HTTPS, non-navigational insecure resource requests are automatically upgraded (first-party as well as third-party requests). Check out mozilla