Load denied by X-Frame-Options: does not permit framing

帅比萌擦擦* 提交于 2019-11-26 20:48:54

问题


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.

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?


回答1:


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.

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.




回答2:


If your goal isn't to build a website (intended for others to visit) which embeds other websites inside your own, and this is truly for personal use, then a solution is to search for and install any add-on that lets you modify response headers, or even more poignant - get the "Ignore X-Frame-Options" add-on.

These add-ons will intercept the response from the remote server and allow you to replace the X-Frame-Options header value with ALLOWALL - which in turn will cause your browser to allow the response to be embedded in a frame.

As it turns out, another SO question even discusses the code required to write your own add-on that does this: Disable X-Frame-Option on client side




回答3:


Just add Ignore X-Frame-Options Header by ThomazPom this addon on mozzila and it will work fine. And There is no other solution. Below is the link

https://addons.mozilla.org/en-US/firefox/addon/ignore-x-frame-options-header/



来源:https://stackoverflow.com/questions/38699221/load-denied-by-x-frame-options-does-not-permit-framing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!