X-Frame-Options 拒绝加载:不允许成帧 [英] Load denied by X-Frame-Options: does not permit framing

查看:27
本文介绍了X-Frame-Options 拒绝加载:不允许成帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将创建一个网站,除了它自己的内容之外,它还包含指向世界最大报纸网站(如纽约时报、金融时报和其他一些网站)的链接(在 iframe 中).

I'm going to create a website which — in addition to its own content — would have links (in iframes) to the world biggest newspaper websites like New York Times, Financial Times and some other.

但是我遇到了框架许可的问题.例如,纽约时报向我展示了一个错误 Load denied by X-Frame-Options: http://www.nytimes.com/不允许成帧.我已经阅读了很多论坛,但没有找到可行的解决方案.试图添加 Header 总是将 X-Frame-Options SAMEORIGIN 附加到 .haccess 文件中,但没有帮助.有什么办法可以解决这个问题吗?

But I've faced with a problem of framing permission. For example, NY Times shows me an error Load denied by X-Frame-Options: http://www.nytimes.com/ does not permit framing. I have read many forums and didn't found a workable solution. Tried to add Header always append X-Frame-Options SAMEORIGIN into .haccess file but it didn't help. Is there any way to solve this problem?

推荐答案

某些网站的服务器设置不允许其他网站对其内容进行框架化".这主要是为了保护他们的版权和直接访问他们网站的流量.

Some websites have a server setting that will not allow other websites to "frame" their content. This is mainly to protect their copyrights and direct traffic to their websites only.

这通常通过将以下内容添加到 Apache 的配置(httpd.conf 文件)来完成:

This is typically done by adding the following to Apache's configuration ( httpd.conf file):

Header always append X-Frame-Options SAMEORIGIN

不幸的是,如果您想构建网站,您真的无能为力.

Unfortunately, there is really nothing you can do about it if you want to frame the website.

这篇关于X-Frame-Options 拒绝加载:不允许成帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆