jjg / RESTduino

A sketch to provide a REST-like interface to the Arduino+Ethernet Shield
GNU General Public License v3.0
284 stars 40 forks source link

CORS support #14

Closed jjg closed 9 years ago

jjg commented 11 years ago

Need to return CORS heaers lest browsers talking directly to RESTDuino become angry.

Interestingly this doesn't seem to impact "write" operations, i.e., you can issue GET requests that are processed by RESTDuino, but the browser rejects the response. I haven't tested it yet, but my guess is that "read" operations will fail altogether.

So, RESTDuino should return the necessary CORS headers to make the browsers know it's OK to talk to RESTDuino.