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");即可解决
“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");即可解决
相关文章推荐
- 在https中引用http的api资源中涉及的一些问题
- https网站引用http路径的js和css失效解决办法
- [置顶] nginx中配置https的服务页面中引用http资源问题
- windows下如何解决PHP调用的外部程序超时阻塞问题
- 关于HttpModule中像图片,*.css,*.js等资源文件也被请求问题的解决
- 解决Apache+PHP服务器提示HTTP 500问题
- onclick方法中引用外部其它元素需要final问题解决
- https,https的本地测试环境搭建,asp.net结合https的代码实现,http网站转换成https网站之后遇到的问题
- 在myEclipse中开发J2ME程序,引用外部jar文件的问题解决
- IIS ASP.NET网站部署问题解决: ASP.NET 未被授权访问所请求的资源。请考虑授予 ASP.NET 请求标识访问此资源的权限。
- WindowsPhone问题笔记-- 正确选择build action 解决媒体资源无法读取问题 转:http://www.cnblogs.com/qinxg/archive/2012/07/17/2594503.html
- IBM WAS5.x "无法定位资源引用 jdbc/DSName,因此使用下列缺省值"问题解决方案
- WPF引用外部类库中的资源文件提示不能找到的解决方法
- 关于HttpModule中像图片,*.css,*.js等资源文件也被请求问题的解决
- Barry手记:解决PHP连接MYSQL的HTTP500问题
- PHP解决引用路径和重复引用文件已经其中的HTML代码的路径问题的终极解决方案
- PHP如何解决网站大流量与高并发的问题
- PHP如何解决网站大流量与高并发的问题
- ubuntu nginx php mysql 网站架设过程中遇到问题的解决记录
- https和http,IE7请求被拦截的问题解决