【发布时间】:2015-11-25 14:56:00
【问题描述】:
我正在 Grails 中创建一个网站,我想在 iframe 窗口中使用我的页面。但是当我在 iframe 中打开 twitter 的 Oauth 页面时,它会显示错误:
拒绝显示 'https://api.twitter.com/oauth/authorize?oauth_token=token' 在一个框架中 因为它将“X-Frame-Options”设置为“SAMEORIGIN”
当我想在 iframe 中打开 google+、wordpress 和 youtube Oauth 访问页面时,也会出现此错误。
如果是 google+:
拒绝显示 'https://accounts.google.com/AccountChooser?continue=https%3A%2F%2Faccounts....%26hl%3Den%26from_login%3D1%26as%3D66a03fa55190219f&btmpl=authsub&hl=en_GB' 在一个框架中,因为它将“X-Frame-Options”设置为“DENY”。
如果是wordpress:
拒绝显示 'public-api.wordpress.com/oauth2/authorize?client_id=33528&redirect_url=/login/oAuthCallBack&response_type=code&state=0001x02' 在一个框架中,因为它将“X-Frame-Options”设置为“SAMEORIGIN”
请提出任何解决方案,如何在 iframe 中打开这些页面。
【问题讨论】:
-
您有没有想过,为什么不允许您在 iframe 元素中显示这些页面?
标签: wordpress grails iframe twitter oauth