当前位置:   article > 正文

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

the request has been blocked

js报错:

This request has been blocked; the content must be served over HTTPS

 

报错原因:

http、https混合导致的

网站用的是 https 要跳转到 http 请求,被阻止了。

解决方法:

1.页面中都是用 https ,或者都使用 http

2.在 <head> 标签中添加以下代码

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

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

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

闽ICP备14008679号