拒绝显示在框架中,因为它将'X-Frame-Options'设置为'SAMEORIGIN' [英] Refused to display in an frame because it set 'X-Frame-Options' to 'SAMEORIGIN'

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

问题描述

https://developers.google.com/drive/web/下载视频和示例代码quickstart / quickstart-js 将本地系统中的任何文件上传到Google drve我被一个错误状态卡住了
$ b

拒绝显示' https://accounts.google.com/o/oauth2/auth?client_id=% 3CAIzaSyDa2kGIMQCLdfzk ...%2Flocalhost& response_type = token& state = 513052220%7C0.1330524626& authuser = 0',因为它将'X-Frame-Options'设置为'SAMEORIGIN'



我注册了一个新的客户端ID,并在代码中更改了新的客户端ID
也使用 chrome.exe - 用户数据dir =c:/ temp / chromedev--disable-web-security

这是n与在Chrome浏览器中禁用安全性有关。
我相信我的XAMPP Windows本地主机可能存在一些问题。在node.js服务器中部署相同的应用程序或将Dropbox / Google Drive作为网络应用程序托管也可以正常工作。


FOllowing the video and sample code from https://developers.google.com/drive/web/quickstart/quickstart-js to upload any file from local system to google drve i was stuck with an error which states

"Refused to display 'https://accounts.google.com/o/oauth2/auth?client_id=%3CAIzaSyDa2kGIMQCLdfzk…%2Flocalhost&response_type=token&state=513052220%7C0.1330524626&authuser=0' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'."

I registered for a new client ID and also changes in the code with new clien ID Also disabled the chrome security using "chrome.exe --user-data-dir="c:/temp/chromedev" --disable-web-security" in run command.

解决方案

This is not related to disabling security in chrome browser. I believe there might me some issues with my XAMPP Windows local host.Deploying the same application in node.js server or hosting Dropbox/Google Drive as a web app also works fine.

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

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