php - X-Frame-Options 拒绝加载

标签 php firefox iframe

我自己的服务器上有一个视频池,另一家公司在他们开发的视频播放器中为我提供 geoloc 服务。问题是我正在尝试像这样加载我的提供商的一个简单的 iframe:

<iframe src="http://myvideoplayerprovider.com/videos/198" width="620px" height="360px" frameborder="0"></iframe>

带有视频的 iframe 在 Chrome 和 Safari 中显示没有问题。但是在 Firefox 中,控制台给了我这个错误,并且没有在浏览器上显示任何内容:

Load denied by X-Frame-Options: https://www.mydomain.com/ does not permit framing by http://subdomain.mydomain.com/gala8-foo/.

我已经在我的 htaccess 中尝试了 X-Frame-Options 但没有成功,这行 php 也没有任何改变:

<? header('X-Frame-Options: GOFORIT'); ?>

另一个想法?

最佳答案

将此添加到(两个)应用程序的 web.xml

  <context-param>
    <description>Security precaution to prevent clickjacking: bust frames if the ancestor window domain(protocol, host, and port) and the frame domain are different. Another options for this parameter are always and never.</description>
    <param-name>org.apache.myfaces.trinidad.security.FRAME_BUSTING</param-name>
    <param-value>never</param-value>
  </context-param> 

关于php - X-Frame-Options 拒绝加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19795541/

相关文章:

php - Select id_value from db into array 复选框并将多个值从数组复选框插入到一列,并以逗号分隔

javascript - 在 Firefox 中检测可滚动 div 何时为 "focused"?

javascript - 使用 javascript 访问 iframe 的字段

javascript - 当 POST 到 iframe 时,location.reload 会阻止表单提交(Firefox 37.0.2)

php - 要 SOAP 还是不要 SOAP?什么最适合我的网络服务?

php - 使用 PHP 和 JQuery 上传多个文件

html - MP4 视频未在 <video> 标签中在 Firefox 上播放,如果直接打开则播放

css - 旋转 css 在 chrome 中不起作用

Javascript-iframe 通信

php - 使用访问者IP获取内容页面