如果我创建iframe这样的:
var dialog = $('<div id="' + dialogId + '" align="center"><iframe id="' + frameId + '" src="' + url + '" width="100%" frameborder="0" height="'+frameHeightForIe8+'" data-ssotoken="' + token + '"></iframe></div>').dialog({
Run Code Online (Sandbox Code Playgroud)
我该如何修复错误:
拒绝
'https://www.google.com.ua/?gws_rd=ssl'在框架中显示,因为它将'X-Frame-Options'设置为'SAMEORIGIN'.
用JavaScript?
我想在用户提供视频链接后,将YouTube视频嵌入到我的页面中.
<iframe width=\'560\' height=\'315\' src='http://www.youtube.com/watch?v=<video id>&output=embed' frameborder=\'0\' allowfullscreen></iframe>
Run Code Online (Sandbox Code Playgroud)
但是当我尝试添加这个时,我得到了这个错误.在chrome中检查页面后,我在控制台选项卡中看到此错误
"因X-Frame-Options禁止显示器而拒绝显示文档"
我不能看视频,甚至在IE和Firefox也
我甚至试过加入
header('X-Frame-Options:Allow-From http://www.youtube.com');
header('X-Frame-Options:GOFORIT);
&output=embed to the url
Run Code Online (Sandbox Code Playgroud)
在其他帖子中阅读了某些解决方案后
但我仍然得到同样的错误.
我也看到youtube有对象嵌入的方法来显示视频,但是youtube已经将其作为嵌入视频的旧方法.所以我想使用新的iframe方法将视频嵌入到我的页面中.
问题出现在
有人遇到过这个问题吗?
在控制台中接收此消息:拒绝显示在框架中,因为它将"X-Frame-Options"设置为DENY
当站点在移动版本中显示时会发生这种情况,如果用户代理是移动设备,则只会提供一组不同的html和资产.
它会在控制台错误消息中显示m.facebook.com.
FB.ui(
{
method: 'share',
href: 'https://www.espn.com/mlb',
},
function(response) {
if (response && !response.error_code) {
console.log('shared_post');
//facebook_post_to_fanpage(access_token_data, link_id, song);
return true;
} else {
return false;
}
}
);
Run Code Online (Sandbox Code Playgroud)
我可以在网站的移动版本上使用FB.api,以及登录和getauth没有任何问题,但是当我尝试使用FB.ui时,它给我配合,包括共享和提要方法.
如果我使用的是facebook javascript sdk,我想我会很清楚.
嗨,我使用 codeigniter 和 bootstrap 开发了一个网站,我在我的管理页面中上传了 youtube url,并使用 iframe 在我的视图页面中获取该 url 并加载该 url。但是youtube视频没有显示当我检查网站时,错误显示如下
拒绝在框架中显示“ https://www.youtube.com/watch?v=7Ct59FQIbAU ”,因为它将“X-Frame-Options”设置为“sameorigin”。广告:522 GET https://www.youtube.com/watch?v=7Ct59FQIbAU net::ERR_BLOCKED_BY_RESPONSE
当我检查这个网站时,网址显示但视频没有显示..这是那个网站网址 www.clicx.in/pixelerror
在我的本地服务器中它的工作
视图代码是
<div class="container">
<div class="row">
<?php foreach($advertisement as $ad) { ?>
<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src="<?php echo $ad->url?>"></iframe>
</div>
<?php }?>
</div>
</div>
Run Code Online (Sandbox Code Playgroud) javascript ×3
html ×2
php ×2
codeigniter ×1
cross-domain ×1
facebook ×1
jquery ×1
security ×1
youtube ×1