最近是做百度小程序的时候,使用百度api_debug工具调试接口的时,出现了下面的报错:
xhr.js:172 Mixed Content: The page at 'https://open.baidu.com/static/newopen/api_debug/'
was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint
'http://forge.speedtest.cn/api/v2/baidu/deal'. This request has been blocked; the content
must be served over HTTPS.
如下所示:
出现该问题的原因是:在https里面请求了http链接。在网上找了下,发现大多都是在代码层面进行处理,没有说明在谷歌浏览器下如何处理。研究了下,终于找到了解决办法:
一 选择浏览器左上: