上传图片出现了如下警告:

he content must be served over HTTPS 解决方案

报错的原因就是当前页面是https协议加载的,但是这个页面发起了一个http的ajax请求,这种做法是非法的。HTTPS页面里动态的引入HTTP资源,比如引入一个js文件,会被直接block掉的.在HTTPS页面里通过AJAX的方式请求HTTP资源,也会被直接block掉的。

客户端解决办法
可以在相应的页面的里加上这句代码,意思是自动将http的不安全请求升级为https

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

相关文章:

  • 2021-07-31
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2021-06-20
  • 2022-02-22
  • 2022-12-23
  • 2021-09-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2021-11-10
  • 2021-10-02
相关资源
相似解决方案