简体   繁体   中英

Embed Google App Script to web

I am using appscript and want to embed it in my website iframe but when I load my webpage I receive this error: Load denied by X-Frame-Options:Link does not permit cross-origin framing.

here is code in appscript

function doGet() {
 var output = HtmlService.createHtmlOutputFromFile("index");
 return output.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);

}

I just try to use appscript so don't know how to solve this error, I also read some answer to solve error x-frame denied but it didn't work. Please help me.Thank you

I've been struggling with this same issue myself. I've looked at the other answers on here regarding this, as well as Google's own documentation. As you probably know, none of it works.

My best guess is that it's either a new bug, or Google has updated their same-origin policy and forgot to change their documentation.

Out of curiosity though, does your site have SSL certification? According to the bottom of this page: https://developers.google.com/apps-script/guides/html/restrictions it seems HTTPS is required for active content.

My web page is only HTTP, and I'm wondering if that's the issue. I've tested this without "active content" however, and I still wound up with the same problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM