【发布时间】:2017-04-12 01:50:06
【问题描述】:
我正在尝试将使用 Google Apps 脚本中的 Javascript 动态构建的页面嵌入到 iFrame 中的我的网站中,但未显示 iFrame 的内容。 Google Apps 脚本具有阻止其加载的同源策略。
我想要做的是(我删除了完整的链接):
<iframe src="https://script.google.com/a/macros/SCRIPT_ID"></iframe>
我得到的错误是:
Refused to display 'https://script.google.com/a/macros/SCRIPT_ID'
in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
有没有办法更改策略并将内容加载到 iFrame 中?
【问题讨论】:
标签: javascript google-apps-script iframe web-applications same-origin-policy