E
E
Eugene4542020-08-16 13:47:39
JavaScript
Eugene454, 2020-08-16 13:47:39

How to resolve conflict with GuthubPages and OpenWeatherMap API?

I decided to make a weather application and took the data from https://openweathermap.org/ . Everything worked out and I decided to upload GitHub and Github Pages.

But there was a conflict: Mixed Content: The page at ' https://eugen-www.github.io/weather-app/ ' was loaded over HTTPS, but requested an insecure resource ' api.openweathermap.org/data/2.5/weather ?q=Kyiv&APP... '. This request has been blocked; the content must be served over HTTPS.

How to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lesha, 2020-08-16
@Eugene454

https://github.com/Eugen-www/weather-app/blob/mast...
Lines 44 and 68 knock to api over http. Perhaps because of this.
Or, judging by the error and commits, you just have an old version of the file in the cache. Because the commits show that you changed the protocol to api.openweather, and the error says about the same url. The page shows the weather.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question