'X-Frame-Options'到'SAMEORIGIN'问题的通用解决方案 [英] Generic solution of 'X-Frame-Options' to 'SAMEORIGIN' issue
问题描述
我试图在iframe中打开 http://teeSpring.com/
。它抛出拒绝在框架中显示'http://teespring.com/',因为它将'X-Frame-Options'设置为'SAMEORIGIN'。
错误。
我已经通过了多个答案,但没有一个对我有用。大多数解决方案都针对Google地图,脸书或YouTube视频。
这是我的代码:
< html>
< head>
< base target =_ blank/>
< script src =http://code.jquery.com/jquery-1.11.0.min.js>< / script>
< / head>
< body>
< / iframe>
< / body>
< / html>
我曾使用 target =_ blank
但没有运气。
注意:尝试打开第三方页面。所以我无法控制添加头文件或其他元数据。
teespring.com
告诉访问者的浏览器他们不应该在框架中显示它。
您有四种选择:
teespring.com
并说服他们不要这样做
I am trying to open http://teeSpring.com/
in an iframe. It is throwing Refused to display 'http://teespring.com/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
error.
I have gone through multiple answers but none of it worked for me. Most of the solutions are specific to google-maps, facebook or youtube video.
Here is my code:
<html>
<head>
<base target="_blank" />
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
</head>
<body>
<iframe src="http://teespring.com" name="frame1" style="border: 0; width:20%; height:20%; overflow:auto;">
</iframe>
</body>
</html>
I did use target="_blank"
but no luck.
Note: Trying to open third party pages. So I have no control over adding header or other meta data.
teespring.com
is telling your visitors' browsers that they should not display it in a frame.
You have four options:
- Talk to whomever runs
teespring.com
and convince them not to do that - Just link to them instead of trying to shove them into a frame
- Don't point your visitors to them at all
- Proxy their site and point the iframe at your proxy (this may step into copyright infringement territory)
这篇关于'X-Frame-Options'到'SAMEORIGIN'问题的通用解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!