<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Peter He on Medium]]></title>
        <description><![CDATA[Stories by Peter He on Medium]]></description>
        <link>https://medium.com/@peterhe?source=rss-ad4bac476efb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xeZY8WiKet8Upc8HN7KOLg.jpeg</url>
            <title>Stories by Peter He on Medium</title>
            <link>https://medium.com/@peterhe?source=rss-ad4bac476efb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 12:36:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@peterhe/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Custom Domains on Google Apps Script]]></title>
            <link>https://medium.com/nuclear-chicken/custom-domains-on-google-apps-script-46734fb8b4b6?source=rss-ad4bac476efb------2</link>
            <guid isPermaLink="false">https://medium.com/p/46734fb8b4b6</guid>
            <category><![CDATA[google-apps-script]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[custom-domain]]></category>
            <dc:creator><![CDATA[Peter He]]></dc:creator>
            <pubDate>Tue, 30 May 2017 12:14:51 GMT</pubDate>
            <atom:updated>2017-05-30T12:14:51.289Z</atom:updated>
            <content:encoded><![CDATA[<p>It may have occurred to you that when deploying a Google Apps Script web app, the URL spewn forth looks rather long and unattractive:</p><blockquote>https://script.google.com/macros/s/<strong>*mashes keyboard*</strong>/exec</blockquote><p>And that it would be a lot nicer to have something more succinct like</p><blockquote><a href="https://mysite.com/thing">https://mysite.com/thing</a></blockquote><p>Well, this has indeed troubled and racked the minds of many a stackoverflow poster trying to circumvent Google’s top-notch cross-domain prevention skills… until now…</p><p>It turns out that the solution to hosting Google Apps Script web apps on custom domains has been under our noses for all this time. The secret sauce lies in the setXFrameOptionsMode method in the HtmlService class. It takes an enum of one of two values: DEFAULTor ALLOWALL. What we want to do is to set this to ALLOWALL.</p><pre>return HtmlService<br>     .createTemplateFromFile(&#39;login&#39;)<br>     .evaluate()<br>     .setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);</pre><p>This now means that we are at liberty to embed our app into any page using an iframe. It even supports SSL.</p><pre>&lt;iframe src=&quot;https://script.google.com/macros/s/<strong>*mashes keyboard*</strong>/exec&quot;&gt;&lt;/iframe&gt;</pre><p>And the end result is something quite stunning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9lZESqhYhTnvUvPh6k-lVQ.png" /><figcaption>Notice how the URL doesn’t take up the entire address bar.</figcaption></figure><p>That’s all for today folks. Creds to Stewart for discovering this madness.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46734fb8b4b6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nuclear-chicken/custom-domains-on-google-apps-script-46734fb8b4b6">Custom Domains on Google Apps Script</a> was originally published in <a href="https://medium.com/nuclear-chicken">Nuclear Chicken</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>