且构网

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

如何修复拒绝显示在框架中,因为它将"X-Frame-Options"设置为"sameorigin"

更新时间:2021-09-09 21:52:37

请在安全管道中使用santizer,然后添加如下链接

Please use santizer with safe pipe and then include the link as below

<iframe class="doc" src="https://docs.google.com/gview?url=https://subtreebucket.s3.amazonaws.com/docsFile_1559124133664_dummy.pdf&embedded=true"></iframe>

在iframe中添加源代码时,请确保您使用的是Embedded = true.肯定会的

Make sure you are using embedded=true while adding source in the iframe. It'll definitely work