今天发现一个警告
 
Mixed Content: The page was loaded over HTTPS,blocked the content must be served over HTTPS.,。。
百度了一下含义是因为
是浏览器不允许在https页面里嵌入http的请求,现在高版本的浏览器为了用户体验,都不会弹窗报错,只会在控制台上打印一条错误信息。
最简单的解决办法当然就是不要使用http请求,把网站上的http请求都迁移到https。
 
页面的head中加入:
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
意思是自动将http的不安全请求升级为https
 
 
 
 
 
 
 
 
 
 
 
 

相关文章:

  • 2022-12-23
  • 2021-11-21
  • 2021-10-06
  • 2021-09-09
  • 2021-10-03
  • 2022-02-10
  • 2021-12-26
猜你喜欢
  • 2022-01-03
  • 2022-02-10
  • 2021-06-15
  • 2022-01-07
  • 2021-07-25
  • 2022-12-23
相关资源
相似解决方案