在框架内打开https页面是否有问题 [英] Is there an issue opening a https page within an frame

查看:118
本文介绍了在框架内打开https页面是否有问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以编程方式创建一个html报告,分为两个框架。如果用户然后单击右侧框架上的超链接,则框架将替换为页面内容。



此工作正常,但现在当我尝试链接到任何Discogs发布页面,如



这不是HTTP的问题。消息说:

 拒绝在一个框架中显示https://www.discogs.com/release/1000,因为它将'X-Frame-Options'设置为'SAMEORIGIN'。 

这意味着Discogs块在其他来源的帧中显示其内容而不是 discogs .COM 。你不能用它做任何事情。


I programmatically create a html report, split into two frames. If the user then clicks on a hyperlink on the right hand frame the frame is replaced with the contents of the page.

This worked fine but now when i try to link to any Discogs release page such as this one it doesn't load it

Ive noticed Discogs have moved to secure http, I wonder if this is the issue. Although I can go to other https page such as this Acoustid one without a problem.

If I open the first link in a new tab using target="_blank" it then works okay but that is not what I want.

解决方案

You can see root cause of this problem by opening Developer Tools in Chrome. If I got your problem right, I reproduced it in simple HTML page:

<html>
<body>
    <iframe src="https://www.discogs.com/release/1000"></iframe>
</body>
</html>

It's not a problem of HTTPs. The message says:

Refused to display 'https://www.discogs.com/release/1000' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

It means that Discogs blocks showing their content in frames in other origins than discogs.com. You cannot do anything with it.

这篇关于在框架内打开https页面是否有问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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