且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

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

更新时间:2021-09-09 21:57:55

O.K.在这篇SO帖子的帮助下花了更多时间之后

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

克服X-Frame-Options 禁止显示";

在发布到 google URL 之前,我通过在 url 末尾添加 &output=embed 来解决这个问题:

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);