Reputation: 75
I have an google app script embeded in my google site web page.
It works when I call the page using the native url https://sites.google.com/pritchardaccommodation.co.uk/wrexham/accomdetail
When I call it with the custom url https://www.pritchardaccommodation.co.uk/accomdetail
it gives the following error : script.google.com refused to connect.
Upvotes: 0
Views: 1827
Reputation: 75
yes thank you postmaster that worked
function doGet(e) { return HtmlService.createTemplateFromFile("page").evaluate().setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL); }
but also I had to use a different url
the publish uses the URL: https://script.google.com/macros/s/AKfycbyP9B95KX6hVamCmN3CKVduZm1zLKyaQTG-WDbfhXp9JcOuePs1/exec
which does not work when embedded into a site with a custom URL.
instead I clicked the "Test web app for your latest code." which gives a different URL custom domain instead.
and then change the "dev" on the end to "exec:
Upvotes: 2