[转]https连接加载http资源

当https 连接中包含加载http资源时,浏览器会停止加载,UC浏览器console 会打印如下信息:

Mixed Content: The page at 'https://Xie.cn/' was loaded over HTTPS, but requested an insecure resource 'http://xm/m/vYby6nm?mobile=1'. This request has been blocked; the content must be served over HTTPS.

解决方案一:

在html文件的head标签中添加<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"

当浏览器支持“upgrade-insecure-requests”属性时,会自动将http链接替换为https

解决方案二:

将连接中的算有http连接更换为https

 

 

转自: https://www.cnblogs.com/ncyhl/p/10826727.html

posted @ 2020-03-17 14:00  Sameen  阅读(909)  评论(0编辑  收藏  举报