Hello,
I’m working on Local Weather App. I’m trying to access openweathermap in CodePen using crossorigin.me but still got this error message:
Mixed Content: The page at 'https://codepen.io/xxx' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.openweathermap.org/data/2.5/weather'. This request has been blocked; the content must be served over HTTPS
This is my code:
var tautan = "https://crossorigin.me/http://api.openweathermap.org/data/2.5/weather?lat="+position.coords.latitude+"&lon="+position.coords.longitude+"&units=metric&appid=dad19d1fc96ea160b7a15c69c1a88ece";
When I try to visit the link locally in browser, I got Origin: header is required
message. How to fix this problem? Is there any options I should provide before I could access openweathermap through crossorigin?
Thank you for all your help