您的位置:首页 > 理论基础 > 计算机网络

PHP解决网站从http转https后引用的外部资源警告的问题

2017-07-04 16:39 756 查看
有时候当网站加上ssl后,网站中引用的外部资源会发出一下警告:

“Mixed Content: The page at 'https://m.phzc.com/product/detail?id=5' was loaded over HTTPS, but requested an insecure script 'http://res.wx.qq.com/open/js/jweixin-1.0.0.js'. This request has been blocked; the content must be served over HTTPS.”

这个时候只需要在我们的项目入口文件中加入header("Content-Security-Policy: upgrade-insecure-requests");即可解决
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐