【发布时间】:2018-06-29 01:54:20
【问题描述】:
当我在onsenui 的 iframe 中使用 google docs 查看器时,为什么会出现以下错误?
错误
Refused to display 'https://docs.google.com/viewer?url=http://www.pdf995.com/samples/pdf.pdf' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
代码
<div class="card">
<iframe src="https://docs.google.com/viewer?url=http://www.pdf995.com/samples/pdf.pdf" height="200" width="300"></iframe>
</div>
编辑
我刚刚意识到,即使在不使用 oneen 的纯 html 中,它仍然会给出相同的错误。
【问题讨论】:
标签: html google-docs onsen-ui x-frame-options