【发布时间】:2019-07-22 01:55:33
【问题描述】:
我正在尝试学习 Apps 脚本和一些前端网络开发。我在 Apps Script 中编写了一些代码,并尝试在 Google 站点中呈现它。
这是我在 Apps 脚本中使用的 doGet 函数:
function doGet() {
var template = HtmlService.createTemplateFromFile('Index');
return template.evaluate().setSandboxMode(HtmlService.SandboxMode.IFRAME);
}
有趣的是,当我使用 Google 提供的 URL 时,脚本会自动呈现: https://sites.google.com/corp/view/vrajlinkshortener
但是,当我输入自定义域时,情况并非如此: www.wharton.ml
我查看了文档,但仍然无法弄清楚为什么自定义域会禁止 Apps Script 表单工作。
有什么建议吗?谢谢!
【问题讨论】:
标签: google-apps-script google-sites