【问题标题】:Iframe blocked by Firefox even if the origin is on the same domain (GLPI)Firefox 阻止 iframe,即使来源位于同一域 (GLPI)
【发布时间】:2020-11-11 23:32:07
【问题描述】:

我在域上有一个登录页面:www.extranet.domain.com 在这个页面上我想

<iframe allow-same-origin="true" src="https://anotherdomain.domain.com/page" frameborder="0" style="width:100%;height:100%"/></iframe>

我没有获得 Iframe,而是收到来自 Firefox 的安全问题,说我需要在新窗口中打开网站(cf image https://i.stack.imgur.com/0veFo.png

感谢阅读!

更新:

“anotherdomain.com”上的网站登录页面 (GLPI) 有效。但是当我登录时,我得到了错误!

【问题讨论】:

  • 我在 /inc/html.class.php 中编辑了 GLPI 配置并评论了 header('x-frame-options:SAMEORIGIN') 行,它可以工作! (但似乎不是很安全..)

标签: html web firefox iframe


【解决方案1】:

您可能需要为登录页面和框架设置域,以使您的同源策略生效。

document.domain = "domain.com"

...在两者中。

请参阅Mozilla docs 了解更多信息。

【讨论】:

  • 谢谢!我试试看!
猜你喜欢
  • 1970-01-01
  • 2018-05-15
  • 1970-01-01
  • 2021-06-11
  • 2011-04-18
  • 2018-06-13
  • 1970-01-01
  • 2012-09-04
  • 2016-04-20
相关资源
最近更新 更多