1

I'm currently developped an app script in google sheet to custom an UI by HTML.

All is fine when this app is running without reverse proxy (https://script.google.com), however when I try to launch it with the reverse proxy (https://script.google.com.rproxy.goskope.com), the custom UI stay blank. No error are raised in the console of chrome, however a message appears

"posting uri is not valid: https://docs.google.com.rproxy.goskope.com".

Screen shot of the error

I know that my entreprise limit the scope of authorizations when we pass through the proxy, but today I do not know if my script not run because it is unauthorized, or if something miss in the script to allow him to be run.

Find below the code.gs:

// Use this code for Google Docs, Slides, Forms, or Sheets.
function onOpen() {
  SpreadsheetApp.getUi() // Or DocumentApp or SlidesApp or FormApp.
      .createMenu('Task Card')
      .addItem('Create', 'openDialog')
      .addToUi();
}

function openDialog() {
  var html = HtmlService.createHtmlOutputFromFile('main')
    .setWidth(800)
    .setHeight(750)
    
  SpreadsheetApp.getUi() // Or DocumentApp or SlidesApp or FormApp.
      .showModalDialog(html, 'Create Task card')
}

function include(filename) {
  return HtmlService.createHtmlOutputFromFile(filename)
      .getContent();
}

I try to perform a custom UI inside a google sheet by HTML through proxy (https://script.google.com.rproxy.goskope.com).

I expect that the custom UI appears correctly as it is performed without proxy. (All is fine when I do not passed through reverse proxy)

TheMaster
  • 45,448
  • 6
  • 62
  • 85
Florent
  • 11
  • 2
  • The message I'm getting is that the action is blocked by the IT admin. You might want to consult your IT folks, or try a different proxy. Doesn't seem to be a programming issue. – FiddlingAway Jan 01 '23 at 18:01
  • Quote the actual error. Don't paraphrase. – TheMaster Jan 01 '23 at 19:28
  • So, there's a structure to the [modal app](https://stackoverflow.com/questions/63551837/where-is-my-iframe-in-the-published-web-application-sidebar). There's js injected by Google, which seems to be checking whether the posting(possibly using ``window.postMessage()``) url is equal to "https://docs.google.com". If you have access to the line 132 of the script in the debugger, you maybe able to remove such checks. I'm not familiar with what you can modify in a reverse proxy. – TheMaster Jan 04 '23 at 17:35

0 Answers0