标签: x-frame-options

iframe / popup中的Google oauth2授权

我的应用程序可在iframe中运行(注入chrome扩展名)。该应用程序需要向用户询问有关Google oauth2的权限。由于存在X-Frame-Options:SAMEORIGIN,网址https://accounts.google.com/o/oauth2/auth,因此重定向到oauth-page不能直接在iframe中使用

有没有办法在弹出窗口中显示页面?

x-frame-options oauth-2.0

5
推荐指数
1
解决办法
3177
查看次数

带有Windows Azure托管网页的Microsoft Dynamics CRM Online + IFrame + X-Frame-Options

我正在尝试使用Microsoft Dynamics CRM Online,其中Windows Azure承载显示在Microsoft Dynamics CRM Web应用程序的IFRAME中的自定义网页.

我已阅读http://msdn.microsoft.com/en-us/library/gg509061(带有Windows Azure托管网页的Microsoft Dynamics CRM Online),并且还按照http://social.technet.microsoft.com/上的说明进行操作.wiki/contents/articles/2590.aspx(使用Access Control Service v2.0保护Windows Azure Web角色ASP.NET Web应用程序)

我现在有一个Windows Azure网页,显示要登录的Windows Live Id屏幕.

问题是当我将它放入Dynamics中的IFrame时,我得到以下内容:

此内容无法在框架中显示为了帮助保护您在本网站中输入的信息的安全性,此内容的发布者不允许在框架中显示该内容.

这是由于Windows Live Id登录服务的"X-Frame-Options:deny"的HTTP标头导致Internet Explorer无法在框架中显示页面.当我已经登录到Windows Live Id并且网页尝试验证我时,甚至会发生这种情况.

那么这是如何工作的,因为第一个微软页面暗示它可以通过"带有Windows Azure托管网页的Microsoft Dynamics CRM Online"完成,并可选择显示在IFRAME中?

iframe access-control azure x-frame-options dynamics-crm-2011

5
推荐指数
1
解决办法
1646
查看次数

Rails改变X-Frame选项

很抱歉这样一个noob问题,但我只是不知道这个问题.我正在玩Rails服务器,现在我需要将它嵌入到iFrame中.我已经看到了这里,并 在这里 是如何改变的x框架选项,但对我的生活,我不能找出哪里,我需要真正去做到这一点.我不确定我是否需要在我的应用程序配置文件,我的rails配置文件(这对我来说似乎不太可能)中坚持这个,但我显然忽略了一些东西.

(我不知道是否有必要知道,但我正在运行Ruby 1.9.3和rails 4.0)

一如既往; 在此先感谢大家.

ruby-on-rails x-frame-options

5
推荐指数
1
解决办法
4796
查看次数

Google Drive API无法通过JS打开标准共享对话框(x-frame-options错误)

我有一个使用Google Drive API的JavaScript应用.我在这里阅读了如何打开标准共享对话框:https://developers.google.com/drive/web/manage-sharing

<head>
...
<script type="text/javascript" src="https://apis.google.com/js/api.js"></script>
<script type="text/javascript">
    init = function() {
        s = new gapi.drive.share.ShareClient('<MY_APP_ID>');
        s.setItemIds(["<MY_FILE_ID>"]);
    }
    window.onload = function() {
        gapi.load('drive-share', init);
    }
</script>
</head>
<body>
    <button onclick="s.showSettingsDialog()">Share</button>
</body>
Run Code Online (Sandbox Code Playgroud)

好像我做的一切都正确,当我点击我的share按钮时,对话框开始加载但无法加载.

在控制台中我看到:

Refused to display 'https://drive.google.com/share?...' in a frame
because it set 'X-Frame-Options' to 'SAMEORIGIN'.
Run Code Online (Sandbox Code Playgroud)

我用谷歌搜索了这个错误,我已经看到在SO和其他网站上有一些类似的问题,但它们没有帮助.我猜谷歌不允许自己在非谷歌网站的框架中("SAMEORIGIN"的原因).

如何在我的应用中打开共享对话框?

javascript same-origin-policy x-frame-options google-drive-api

5
推荐指数
1
解决办法
5189
查看次数

Spring 安全中的 X-Frame DENY

我在 spring 项目中使用jquery 下载插件,但浏览器给我以下错误:

Refused to display 'http://localhost:8086/DART/fleetAndCar/download/5' in a frame because it set 'X-Frame-Options' to 'DENY'.
Run Code Online (Sandbox Code Playgroud)

我读到的是 Spring Security 中关于 Xframe 的问题,所以我添加了

http
    .headers()
      .addHeaderWriter(new XFrameOptionsHeaderWriter(XFrameOptionsHeaderWriter.XFrameOptionsMode.SAMEORIGIN))
Run Code Online (Sandbox Code Playgroud)

但它不会改变拒绝但甚至添加 SAMEORIGIN 所以我有他以下错误:

Multiple 'X-Frame-Options' headers with conflicting values ('DENY, SAMEORIGIN') encountered when loading 'http://localhost:8086/DART/fleetAndCar/download/5'. Falling back to 'DENY'.
Run Code Online (Sandbox Code Playgroud)

这是http请求:

在此处输入图片说明

这是我的弹簧配置:

@Configuration
    @Order(1)
    public static class ApiWebSecurityConfig extends WebSecurityConfigurerAdapter{
        @Override
        protected void configure(HttpSecurity http) throws Exception {
            http.csrf().disable()
            .antMatcher("/client/**")
            .authorizeRequests()
            //Exclude send file from authentication because it doesn't work with spring …
Run Code Online (Sandbox Code Playgroud)

ajax jquery spring spring-security x-frame-options

5
推荐指数
1
解决办法
5866
查看次数

Django nginx拒绝显示在框架中,因为它将“ X-Frame-Options”设置为“ SAMEORIGIN”

我已经在具有nginx和uwsgi的服务器上部署了django Web应用程序。我可以使用ip地址完美访问该网站。

我购买了一个域名abc.example.com,并将其指向我的IP地址。现在,当我转到域名时,它将加载一个空白页面并在浏览器控制台中引发错误:

在Chrome中:

Refused to display 'ip address' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
Run Code Online (Sandbox Code Playgroud)

在Mozilla中:

Load denied by X-Frame-Options: 'ip address' does not permit cross-origin framing.
Run Code Online (Sandbox Code Playgroud)

关键是我在整个应用程序中没有任何iframe。

这是什么错误,我该如何解决?

当我使用ip地址转到应用程序时,它可以像预期的那样完美运行。那么域的问题是什么?我仔细检查了Godaddy的dns区域中的设置,但什么都没找到。

django nginx x-frame-options

5
推荐指数
1
解决办法
3196
查看次数

Apache X-Frame-Options Allow-来自多个域

当我在apache中使用x-frame headers选项时出现错误。

Header always append X-Frame-Options ALLOW-FROM site1,site2,site3
Run Code Online (Sandbox Code Playgroud)

要么

Header always append X-Frame-Options ALLOW-FROM=site1,site2,site3
Run Code Online (Sandbox Code Playgroud)

要么

Header always append X-Frame-Options ALLOW-FROM=site1
Header always append X-Frame-Options ALLOW-FROM=site2
Header always append X-Frame-Options ALLOW-FROM=site3
Run Code Online (Sandbox Code Playgroud)

如何设置X-Frame-Options:ALLOW-FROM以支持多个域?

谢谢!

apache x-frame-options

5
推荐指数
4
解决办法
3万
查看次数

无效的“X-Frame-Options”标头。“ ”不是公认的指令

我正在使用 Zuora 托管支付 iframe。简而言之,您可以加载 Zuora 库以访问Z包含 Zuora API 方法的对象。使用Z.render()渲染支付形式到iframe。

当 iframe 加载时,控制台中会显示此错误:

Invalid 'X-Frame-Options' Header when loading '[URL-HERE]': ' ' is not a recognized directive. The header will be ignored.
Run Code Online (Sandbox Code Playgroud)

基于该MDN文档的X-框架选项可用的指令是DENYSAMEORIGINALLOWFROM [URL]

这个指令是否应该在我们发出请求的服务器上设置?或者这是电子商务API的问题?

iframe x-frame-options zuora

5
推荐指数
1
解决办法
5745
查看次数

如何修复拒绝在框架中显示,因为它将“X-Frame-Options”设置为“sameorigin”

在 angular 中使用 i-frame 时出现错误。它拒绝在框架中显示,因为它将“X-Frame-Options”设置为“sameorigin”

拒绝在框架中显示“https://docs.google.com/gview?url=https://subtreebucket.s3.amazonaws.com/docsFile_1559124133664_dummy.pdf”,因为它将“X-Frame-Options”设置为“sameorigin” '。

html iframe x-frame-options

5
推荐指数
2
解决办法
2万
查看次数

如何修复拒绝在框架中显示,因为它将“X-Frame-Options”设置为“拒绝”

在 angular 中使用 i-frame 时出现错误

拒绝在框架中显示“ https://localhost:2800/sample/id ”,因为它将“X-Frame-Options”设置为“拒绝”。

谁能告诉我如何解决这个错误

谢谢

iframe x-frame-options angular

5
推荐指数
1
解决办法
4782
查看次数