今天早上,当我将Firefox浏览器升级到最新版本(从22升级到23)时,我的后台办公室(网站)的一些关键方面停止了工作。

查看Firebug日志,报告了以下错误:

Blocked loading mixed active content "http://code.jquery.com/ui/1.8.10/themes/smoothness/jquery-ui.css"
Blocked loading mixed active content "http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/jquery-ui.min.js"`

在其他错误中,由上述两个中的后者未加载引起。

上述问题是什么意思?我该如何解决?


当前回答

我发现,如果你在包含或混合http://www.example.com之类的页面时遇到问题,你可以通过放置//www.example.com来解决

其他回答

我已经设法修复这个使用这些:

Firefox用户

在地址栏中打开新选项卡,输入about:config,进入配置界面。 搜索security.mixed_content.block_active_content 将TRUE改为FALSE。

Chrome用户

单击URL旁边的“不安全警告” 在弹出框中单击“站点设置” 将不安全内容更改为允许 关闭并刷新页面

我只是通过在头部添加以下代码来修复这个问题:

    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

由于安全性,它给出了误差。 为此,请在网站url中使用“https”而不是“http”。

例如:

   "https://code.jquery.com/ui/1.8.10/themes/smoothness/jquery-ui.css"
   "https://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/jquery-ui.min.js"

我发现,如果你在包含或混合http://www.example.com之类的页面时遇到问题,你可以通过放置//www.example.com来解决

@if (env('APP_DEBUG'))
        <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
@endif

Laravel Blade的语法,请记住仅用于调试以避免MITM攻击和窃听

也使用

http -> https

对于Ajax或普通JS脚本或CSS也将解决这个问题。