我正在请求从geonames和openweather获取天气信息,但问题是我还使用GeoLocation Api来获取用户位置并且需要https。现在,当我发出http请求时,它说
Mixed Content: The page at 'https://xyz/dashboard' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.geonames.org/findNearByWeatherJSON?lat=33.6154812&lng=73.0105414&username=xyz'. This request has been blocked; the content must be served over HTTPS.
我在http
时提出此https
请求的解决方案是什么。
答案 0 :(得分:1)
您应该考虑执行请求服务器端,并通过安全服务器将数据发送到客户端。