This request has been blocked; the content must be served over HTTPS.
这个错误是因为,服务器进行https改造之后,使用chrome访问https页面,由于我使用的是阿里云OSS,其内部会引入一些http的连接资源,所以在chrome中访问也面会出现这个问题。此时需要在引用相关文件的html页面中的head头部加入如下内容即可。
1 2 3 |
<php>if(IS_HTTPS){</php> <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> <php>}</php> |