微博分享按钮不显示,https的网页存在http资源的解决办法
程序员文章站
2022-03-04 18:06:40
...
微博分享按钮不显示
https的网页存在http资源,
浏览器报错:
The page at * was allowed to display insecure content from *
[blocked] The page at * was not allowed to run insecure content from *
解决办法:
在网页头部添加
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
自动将http的不安全请求升级为https