Create a template HTML in Google Apps Script and display it in doGet.Is it possible to specify the URL of the script in iframe and view it from other sites?
I don't think I can do it at the moment.
X-Frame-Options can be used to prevent web pages from being embedded in iframes on other sites.
If you try to create and access HTML services, you will see the response header
was included, the app script seems to have various security considerations, and it is also restricted.
There may be conditional permission eventually, and there may already be a way to remove the restriction, but the document does not seem to mention it.
You can embed it in Google Sites, so you want me to do it with that.
You can remove the
X-Frame-Options restrictions on sites created by Google Sites in the Google Sites.
Therefore, the Google Sites page itself can be embedded in pages in other domains with iframe.
However, the HTML service embedded in it is still
The reason why it can be embedded in Google Sites is because HTML services embedded in Google Sites are delivered from the sites.google.com domain, not from script.google.com.
This avoids restrictions on
This causes the Google Sites portion to appear in the "Google Sites with HTML Services embedded page" and the HTML Services portion to not appear in it.
(These circumstances change from hour to hour, so I don't know how long this will last.Just in case)
© 2022 OneMinuteCode. All rights reserved.