Weather app: ignoring the use of[SOLVED]

Hey guys, could anyone kindly explain me why the heck I can’t get my app working on both Github and Codepen ? If you open console, it’s throwing this 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.

I’ve encountered this issue a few times, and the only solution I’ve always come up with was to change the APi, but whenever I run the app on my computer it works perfectly, obviously if I don’'t use the ‘’ , it won’t work and I’ll get the same error, but why the heck are these pages ignoring it? Is there an easy solution to fix my issue? Or do I really have to look for another API?

Thank you in advance.

Edit: I only use Chrome/Chromium on Linux, and the app works on my local computer, but doesn’t work on both Github and Codepen.


Put the URL behind “” and see if that fixes the issue, if not let us know and we’ll look into other solutions. has quite a few issues.


Well, I did want to try that… since I thought couldn’t have caused the issue – I was apparently wrong.

The app is working perfectly when your link is used.

Could I ask you a question? What should I do to avoid having such problems in the future? Always look for an API that uses https?

By the way, thanks a lot. I didn’t really expect that. I was even aware of the link you sent.

1 Like

Realistically don’t use, it has issues and is slow, but the Darksky API is nice and has HTTPS - though again you’ll need to work around cross origin issues - either the proxy i provided or jsonp will resolve the issue.

1 Like

Alright then. I’ll keep this API for now, if it stops working for some reason, I’ll make some changes. For my future projects, I’ll try to play around with JSONP. I appreciate your help. Cheers!

1 Like

Glad I could help and let us know if you need anything else :slight_smile:

This worked for me!

Thank you you kept me focussed on my 100 Days of Code challenge as a result. Only on Day 3 atm.

Amazing! Thank you so much for the help! It worked for me as well!

Worked a treat!! Thank you :slight_smile:

its worked for me thank you!!!

I used and it was throwing an error due to some unknown reason. The given link works perfectly. Thanks.

Thanx a ton, this actually worked.