【问题标题】:Authorise mixed content <a href> tag?授权混合内容 <a href> 标签?
【发布时间】:2013-10-06 22:48:34
【问题描述】:

我遇到了混合内容 (http/https) 阻止问题。

我有三个子域“a”、“b”和“c”。只有 b 在 SSL 上可用。

我有一个具有以下框架结构的 Web 应用程序:

最后一个链接被浏览器的混合内容安全策略阻止:

Chrome 30:[blocked] The page at https://b.example.com ran insecure content from http://c.example.com.

Firefox 23:Blocked loading mixed active content "http://c.example.com/"

我如何授权这个直接的&lt;a href=""&gt; 链接绕过混合内容安全策略?

【问题讨论】:

    标签: iframe https cross-browser content-security-policy


    【解决方案1】:

    我首先想到将 &lt;a href=""&gt; 链接指向 https://b.example.com/,这将使 302 重定向到 http://c.example.com/ 上的正确目标,但我看到 Firefox 计划将其作为其混合内容安全性的一部分来阻止策略(错误#418354#456957

    其他解决方案是重新架构所有物理硬件以合并 b.example.com 和 c.example.com 机器;或尝试通过 SSL 使 c.example.com 可用(混乱、多个虚拟主机和 SNI 还不够兼容)

    一个简单的target="_blank" 似乎可以避免这个问题,虽然它并不理想,但在我的情况下它是合适的,我想我会使用这个解决方案。如果有其他解决方案,我会留下问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-03-03
      • 2013-06-24
      • 2012-05-15
      • 2021-12-26
      • 1970-01-01
      • 2016-11-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多