Show the Local weather problem http

I get this in my console and nothing is displayed
Blocked loading mixed active content “”
[Learn More]

How to fix this?

That error:

Mixed Content: The page at ‘’ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘’. This request has been blocked; the content must be served over HTTPS.

is trying to tell you that codepen uses https (secured) and your are calling an http (unsecured) resource and that is forbidden.

You could change your to https, but I think that doesn’t support that.

you might consider another technique to get the position:

  navigator.geolocation.getCurrentPosition(function(position) {
    var lat = position.coords.latitude;
    var lon = position.coords.longitude;

Either that or find an API that supports https.

thank you for answering !

Going along with what @ksjazzguitar said, if you want an IP API that supports https, I made one for the back-end challenges that you can use.

Edit: I forgot that ip-api gives a lot more than the just the IP such as latitude and longitude. You can also use ip-api through a CORS proxy, is one, but I have found that cors-anywhere works better. You can just add it to the front of your url like this:

/* or */