INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: CORS (Cross Origin Resource Sharing) for developers  (Read 1065 times)

dkan24

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 93
  • nothing more to say...
CORS (Cross Origin Resource Sharing) for developers
« on: March 11, 2014, 11:25:27 am »

I was just checking out the REST API calls, and was happy to see it covers a lot! One thing I was hoping for was CORS headers so we can make API calls directly from a web client in Javascript. Are there any plans to offer this?

Here is a good overview of CORS - https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS

Basically, you need to send something like this in the response headers -

Code: [Select]
Access-Control-Allow-Methods:GET
Access-Control-Allow-Origin:*

and then Javascript can load the XML.

Thanks!
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10943
Re: CORS (Cross Origin Resource Sharing) for developers
« Reply #1 on: April 17, 2014, 09:04:54 am »

In an upcoming build:
SDK: The MCWS web service responses set a CORS "Access-Control-Allow-Origin" header.

We don't currently support OPTIONS requests and therefor don't support so called "preflight requests" as outlined by CORS, but I hope this should be enough for your web client.
Logged
~ nevcairiel
~ Author of LAV Filters
Pages: [1]   Go Up