我正在处理 HTML 模板并面临 Mozilla 浏览器的新问题。我在我的控制台中收到这些警告 错误::
Blocked loading mixed active content “http://site_url/assets/fonts/fontawesome-webfont.woff2?v=4.7.0”
Blocked loading mixed active content “http://site_url/assets/fonts/icofont.ttf?v=1.0.0-beta”
检查屏幕截图:
我阅读了有关 Mozilla 新的安全更改的信息,并尽量不使用混合内容。现在我的模板没有任何 https://.... url 。我包含了这样的字体:
<link href="//fonts.googleapis.com/css?family=Exo:300,400,500,500i,600,600i,700,900" rel="stylesheet">
<script src='//maps.googleapis.com/maps/api/js?key=GoogleAPIKey' type="text/javascript"></script>
如何解决这些错误。
最佳答案
在html head标签中加入这段代码
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
关于javascript - 阻止加载混合事件内容 Mozilla 浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51035226/