http - 如何从运行 ssl 的网站向外部 webapi 发出非 ssl 请求

标签 http ssl https weather-api

我正在请求从 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.

当我在 https 上时发出此 http 请求的解决方案是什么。

最佳答案

您应该考虑执行请求服务器端并通过您的安全服务器将数据发送到客户端。

关于http - 如何从运行 ssl 的网站向外部 webapi 发出非 ssl 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37495983/

相关文章:

ssl - 单向 SSL 是否需要可信 keystore

node.js - 反向代理 websockets (SSL),通过 Stunnel 到许多 node.js 应用程序的流量

mysql - REST API - 单个与批量 POST/PATCH(SQL 插入/更新)

http - X-Cloud-Trace-Context 的目的是什么?

ruby - 如何将 TLS 客户端证书与 RubyGems 注册表一起使用?

ssl - 无法重启 nginx https 证书例程私钥不匹配

apache - 从私钥生成 Apache 公钥

http - CFHTTP 不通过 SSL 连接进行连接?

Node.JS:当客户端请求中断时,postdata 会发生什么?

android - 当我有 https ://in the URL 时,HttpURLConnection 不允许我发帖