Mixed Content: The page at ‘https://**.com/#/lbs/truckPoint‘ was loaded over HTTPS, but requested
程序员文章站
2022-05-30 16:30:03
...
报错:
chunk-ff6568fc.8894c5e4.js:1 Mixed Content: The page at
'https://**.com/#/lbs/truckPoint' was loaded over HTTPS,
but requested an insecure script 'http://api.map.baidu.com/api?
v=2.0&ak=84eSmRsdwHeRqIssbkAntHOFkAo09XIN&callback=init'.
This request has been blocked; the content must be served over HTTPS.
原因为系统使用https,而js中有使用http的链接
将http://api.map.baidu.com/api?
v=2.0&ak=84eSmRsdwHeRqIssbkAntHOFkAo09XIN&callback=init
改成
https://api.map.baidu.com/api?
v=2.0&ak=84eSmRsdwHeRqIssbkAntHOFkAo09XIN&callback=init
即可解决。
HTTPS页面里动态的引入HTTP资源,比如引入一个js文件,会被直接block掉的.在HTTPS页面里通过AJAX的方式请求HTTP资源,也会被直接block掉的。
上一篇: 程序不能AC的常见原因
下一篇: pytorch的各种错误集锦