# Weather reports problem with chrome on Mix content with insecure XMLHttpRequest endpoint

**URL:** <https://forum.freecodecamp.org/t/weather-reports-problem-with-chrome-on-mix-content-with-insecure-xmlhttprequest-endpoint/19767>\
**Category:** I Built This\
**Created:** [July 12, 2016, 6:51pm UTC](https://forum.freecodecamp.org/t/weather-reports-problem-with-chrome-on-mix-content-with-insecure-xmlhttprequest-endpoint/19767 "2016-07-12T18:51:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lindawu6](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@lindawu6](https://forum.freecodecamp.org/u/lindawu6)\
**Post date:** [July 12, 2016, 6:51pm UTC](https://forum.freecodecamp.org/t/weather-reports-problem-with-chrome-on-mix-content-with-insecure-xmlhttprequest-endpoint/19767/1 "2016-07-12T18:51:57Z")

</div>

> **[Weather report](https://codepen.io/lindawu6/pen/OXLaEo?editors=1111)**
>
> ...

I got erros on Mix content: The page at ‘[https://codepen.io/lindawu6/pen/OXLaEo?editors=1111](https://codepen.io/lindawu6/pen/OXLaEo?editors=1111)’ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘[http://api.openweathermap.org/data/2.5/weather?lat=37.3951402&lon=-122.03692189999998&appid=9ec5436330d12c1fb5c0ab8a8e2ff7ff](http://api.openweathermap.org/data/2.5/weather?lat=37.3951402&lon=-122.03692189999998&appid=9ec5436330d12c1fb5c0ab8a8e2ff7ff)’. This request has been blocked; the content must be served over HTTPS.send @ jquery-2.2.4.min.js:4  
j

with chrome browser? Any suggestion on how to fix this one will be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![PortableStick](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/portablestick/32/65591_2.png) [@PortableStick](https://forum.freecodecamp.org/u/PortableStick)\
**Post date:** [July 13, 2016, 2:13pm UTC](https://forum.freecodecamp.org/t/weather-reports-problem-with-chrome-on-mix-content-with-insecure-xmlhttprequest-endpoint/19767/2 "2016-07-13T14:13:48Z")

</div>

It’s giving you this error because you’re loading insecure content to a user (you) who has a secure connection to CodePen. It seems like you may have already fixed this by making the AJAX call use HTTPS, but you could also omit the protocol entirely and let the browser use whichever it can at the time:

> “[//api.openweathermap.org/data/](https://api.openweathermap.org/data/)…”

---

<div class="post-metadata">

**Author:** ![lindawu6](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@lindawu6](https://forum.freecodecamp.org/u/lindawu6)\
**Post date:** [July 13, 2016, 7:09pm UTC](https://forum.freecodecamp.org/t/weather-reports-problem-with-chrome-on-mix-content-with-insecure-xmlhttprequest-endpoint/19767/3 "2016-07-13T19:09:15Z")

</div>

No, this bug is not fixed. The weather information is not loaded in Chrome.

---

<div class="post-metadata">

**Author:** ![PortableStick](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/portablestick/32/65591_2.png) [@PortableStick](https://forum.freecodecamp.org/u/PortableStick)\
**Post date:** [July 13, 2016, 7:16pm UTC](https://forum.freecodecamp.org/t/weather-reports-problem-with-chrome-on-mix-content-with-insecure-xmlhttprequest-endpoint/19767/4 "2016-07-13T19:16:01Z")

</div>

I keep forgetting that OpenWeather doesn’t allow SSL connections to their API for free accounts. It will never work. You can either put a note on your website telling people to connect over HTTP (not a grand idea), or use something like [Forecast.io](https://developer.forecast.io).

---

<div class="post-metadata">

**Author:** ![lindawu6](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@lindawu6](https://forum.freecodecamp.org/u/lindawu6)\
**Post date:** [July 13, 2016, 8:40pm UTC](https://forum.freecodecamp.org/t/weather-reports-problem-with-chrome-on-mix-content-with-insecure-xmlhttprequest-endpoint/19767/5 "2016-07-13T20:40:45Z")

</div>

Got it. Thanks for your reply!

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:10pm UTC](https://forum.freecodecamp.org/t/weather-reports-problem-with-chrome-on-mix-content-with-insecure-xmlhttprequest-endpoint/19767/6 "2021-06-01T18:10:35Z")

</div>

Closed on June 1, 2021, 6:10pm UTC


