Google Site上的Apps脚本小工具开始抛出CORS错误

时间:2014-03-14 09:02:20

标签: javascript google-chrome google-apps-script cors google-sites

我有一个包含多个网页的Google网站,其中都包含Google Apps脚本小工具。用户报告说,几个月前,Apps脚本小工具停止工作。我对它们进行了测试,发现Apps Script小工具正确加载并显示来自UI服务的内容,但是,当单击任何运行某个功能的按钮时,Apps脚本小工具会挂起并且浏览器中出现控制台错误:

Uncaught SecurityError: Failed to read the 'frame' property from 'Window': Blocked a frame                      
with origin "https://sites.google.com" from accessing a frame with origin
"https://xxxxxxxxxxxxxxxx-a-sites-opensocial.googleusercontent.com".
Protocols, domains, and ports must match.

Google是否更改了某种安全策略,以防止对Apps脚本脚本发出Cross Origin请求?这有什么办法吗?

由于

斯图

1 个答案:

答案 0 :(得分:0)

我能找到解决此问题的唯一方法是使用在新页面中打开Apps脚本网址的链接替换小工具。