0

I am sending an (HTTP GET) $.ajax request (from jsfiddle) to my Google Apps Script server and I get the following error:

XMLHttpRequest cannot load https://script.google.com/macros/s/mykey?params.

Origin http://fiddle.jshell.net is not allowed by Access-Control-Allow-Origin.

What is the best way to solve this problem?

I have successfully implemented jsonp $.ajax requests to retrieve json data and javascript using this GAS/jsfiddle configuration. However, I seem unable to accomplish this jsonp success this time. Possibly because I am going through an .updaterow() function (per jqWidgets?)

My research:

  1. This post almost asks a similar question except it is not specific to GAS.
  2. I do not think GAS allows one to set server-side response headers. But surely there must be a way to get my request to execute?
  3. Perhaps this question explains it better? (GAS issue) Is there a workaround solution? (Come on creative people.)
Community
  • 1
  • 1
Let Me Tink About It
  • 11,866
  • 13
  • 72
  • 169

1 Answers1

2

GAS does not allow CORS headers at this time.

Let Me Tink About It
  • 11,866
  • 13
  • 72
  • 169