拒绝在该框架中显示,因为它设置'X帧选项“到”SAMEORIGIN“ [英] Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'

查看:1920
本文介绍了拒绝在该框架中显示,因为它设置'X帧选项“到”SAMEORIGIN“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个应该响应,使人们可以从他们的手机访问该网站。该网站已经得到了可以登录到使用谷歌,Facebook,...等(OAuth的)。

I am developing a website that is supposed to be responsive so that people can access it from their phones. The site has got some secured parts that can be logged into using Google, Facebook, ...etc (OAuth).

服务器后端使用ASP.Net的Web API 2和前端开发,主要是一些剃刀AngularJS。

The server backend is developed using ASP.Net Web API 2 and the front end is mainly AngularJS with some Razor.

有关身份验证的一部分,一切都在所有的浏览器工作正常,包括Android,但谷歌认证不工作在iPhone上,这让我这个错误讯息

For the authentication part, everything is working fine in all browsers including Android but the Google authentication is not working on iPhone and it gives me this error message

Refused to display 'https://accounts.google.com/o/openid2/auth
?openid.ns=http://specs.openid.ne…tp://axschema.org/namePerson
/last&openid.ax.required=email,name,first,last'
in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

现在就我个人而言,我不我的HTML文件中使用任何iframe中。

Now as far I am concerned I do not use any iframe in my HTML files.

我GOOGLE了四周,但没有回答让我来解决该问题。

I googled around, but no answer got me to fix the issue.

推荐答案

O.K。本证的帮助下花更多的时间在这之后SO发布

O.K. after spending more time on this with the help of this SO post

<一个href=\"http://stackoverflow.com/questions/6666423/overcoming-display-forbidden-by-x-frame-options#answer-7469997\">Overcoming &QUOT;显示器用X帧方式]禁止;

我设法解决这个问题,加入&放大器;输出=嵌入来的网址年底发布到谷歌网址前:

I managed to solve the issue by adding &output=embed to the end of the url before posting to the google URL:

var url = data.url + "&output=embed";
window.location.replace(url);

这篇关于拒绝在该框架中显示,因为它设置'X帧选项“到”SAMEORIGIN“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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