Issue with the "Show local weather" project

Taken from CodePen website :

What Will Change
Beginning June 1, 2017:

Every page on CodePen will be served over HTTPS.
Requests that come in over HTTP will be redirected to HTTPS.
We’ll attempt to request an HTTPS version of any content linked via HTTP. If an HTTPS version is available, we’ll load that content over HTTPS. If not, the content may fail to load (more details below).

Therefore we cannot use the second method proposed on freecodecamp :

Or:

Use an Internet Protocol API to get user location (ex. IP-API) and then use the OpenWeatherMap API for the weather. Be sure to connect to CodePen.io via http://.

Correct me if I’m wrong.

Yes, you’re correct.

I was getting a cross-origin error while using the other option :

Use HTML5 Geolocation to get user location and then use the Dark Sky API which uses an HTTP Secure connection for the weather. Also, be sure to connect to CodePen.io via https://.

Managed to work around it by adding “https://crossorigin.me/” before the actual api request path.

I think this is would be useful information for campers.

1 Like

Made this is issue on gitub.

Cheers