google.com没有在Iframe中打开。可以在我的应用程序中打开google.com

时间:2017-11-27 04:21:38

标签: javascript html5 iframe

我正试图通过iframe在我的网络应用程序中打开google.com网址,但它给了我“X-Frame-Options:SAMEORIGIN”错误和内容未加载问题。有没有替代或解决方法来做到这一点。

非常感谢帮助。

2 个答案:

答案 0 :(得分:1)

查看https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options了解详情。

X-Frame-Options HTTP响应标头可用于指示是否应允许浏览器在< frame>,< iframe>中呈现页面。或< object>

X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN
X-Frame-Options: ALLOW-FROM https://example.com/

<meta http-equiv="X-Frame-Options" content="deny">

答案 1 :(得分:0)

https://cse.google.com/all使用此代替。 https://www.youtube.com/watch?v=Oy04EsioLPo这一定是你正在寻找的东西。