当前位置:   article > 正文

https连接加载http资源

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/711920
推荐阅读
相关标签
  

闽ICP备14008679号