报错如下:

 

原因:

http、https混合导致的

HTTPS页面里动态的引入HTTP资源,比如引入一个js文件,会被直接block掉的.在HTTPS页面里通过AJAX的方式请求HTTP资源,也会被直接block掉的。

 

解决方法:

在报错页面的<head>中加入:

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"/>

意思是自动将http的不安全请求升级为https

 

 

更多推荐

页面跳转报错: This request has been blocked; the content must be served over HTTPS