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


在 HTTPS 承载的页面上不允许出现 http 请求,一旦出现就是提示或报错:
This request has been blocked; the content must be served over HTTPS

解决方案:

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

php:
header("Content-Security-Policy: upgrade-insecure-requests");

nginx:在server模块增加
add_header Content-Security-Policy "upgrade-insecure-requests;connect-src *";


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM