简体   繁体   English

从'X-Frame-Options'到'SAMEORIGIN

[英]'X-Frame-Options' to 'SAMEORIGIN

Im trying to embeded some site like this 我试图嵌入这样的网站

<iframe src="http://somesite.com"></iframe>

But im getting this error. 但即时通讯收到此错误。

Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'

Is there a way how to fix this error? 有没有办法解决此错误?
Site that I need to embeded isnt mine 我需要嵌入的网站不是我的

您可以要求网站所有者更改对您域的访问权限,也可以尝试使用curl或file_get_contents从php端进行访问。

This will do the trick, it gets the contents of remote site and pastes it. 这将解决问题,它将获取远程站点的内容并将其粘贴。

    <?php
        $url = "https://google.com";
        echo '<base href="'.$url.'" />' . file_get_contents($url);
    ?>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从“ X-Frame-Options”到“ SAMEORIGIN”。 错误 - 'X-Frame-Options' to 'SAMEORIGIN'. error 拒绝在框架中显示,因为它将“X-Frame-Options”设置为“sameorigin” - Refused to display in a frame because it set 'X-Frame-Options' to 'sameorigin' iframe 错误:因为它将“X-Frame-Options”设置为“sameorigin” - Iframe error : because it set 'X-Frame-Options' to 'sameorigin' “ X-Frame-Options”到“ SAMEORIGIN”问题的通用解决方案 - Generic solution of 'X-Frame-Options' to 'SAMEORIGIN' issue X-Frame-Options:sameorigin的跨域错误? - Cross-origin error with X-Frame-Options:sameorigin? iframe嵌入Office 365 excel:拒绝在框架中显示链接,因为它将“ X-Frame-Options”设置为“ SAMEORIGIN” - Iframe embed Office 365 excel : Refused to display link in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN' 如何修复拒绝在框架中显示,因为它将'X-Frame-Options'设置为'sameorigin - How to fix Refused to display in a frame because it set 'X-Frame-Options' to 'sameorigin 拒绝在框架中显示“https://abcd.ac.in/”,因为它将“X-Frame-Options”设置为“sameorigin” - Refused to display 'https://abcd.ac.in/' in a frame because it set 'X-Frame-Options' to 'sameorigin 在JSP,JAVA,WEB.xml的哪里添加x-frame-options:sameorigin哪里? - Where add x-frame-options :sameorigin , in JSP , JAVA,WEB.xml , where? 如何使用反向代理避开X-Frame-Options:iframe的SAMEORIGIN - how to use a reverse proxy to get around X-Frame-Options: SAMEORIGIN for iframe
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM