I checked out this link here on SO: Dealing with HTTP content in HTTPS pages
I tried this regarding open protocols from here: http://benpowell.org/https-and-http-the-protocol-less-or-protocol-relative-urls/
But I have only one call to an HTTP url for openweathermap which does not serve up it's content via HTTPS, unless you pay them 500/mo. Can't do it.
So, I need to find a way to bring in the HTTP content for OpenWeatherMap and not generate the "mixed content" error message on "any" browser.
Here's the API call for OWM: http://api.openweathermap.org/data/2.5/weather?lat=32.22&lon=-100.50&APPID=c6fdcf2d49a0bba3e14f310bd3d5cdc2
Any thoughts, anyone?
Thanks, in advance.
Since forecast.io changed into Dark Sky and they don't allow CORS, thus forcing you to implement a server-side application, I looked for a different solution suitable for a small front-end project.
I found apixu.com, which seems to be much better suited for a simple purpose like mine: FreeCodeCamp project.
They provide both, http and https calls. You get 5000 calls per month for free.
I was able to get the api to load on my site that enforces https with a little bit of php.
Basically, I curl the http site and store the results on a page on my domain which is https so it works perfect for me.
I wrote a little function to do the work for me
#Full snippet
Stumbled upon this thread while trying to get my application hosted on heroku while using the Open Weather Map API.
Put this in front of the url:
so that the url becomes
Check your application again and note that the openweather url is http again (the way it was originally)! This solution worked for me, although the CORS solution may not last forever.