Reviving this topic since I'm hitting the same problem as rlebrette.
Returning Access-Control-Allow-Origin = * works
only if MCWS authentication is turned off. If you turn authentication on, preflight mode is required by all browsers.
This means MCWS needs to support OPTIONS requests, see
http://www.html5rocks.com/en/tutorials/cors/ and
http://enable-cors.org/server.html. Not that complicated, but still quite ugly.
I have a minimal Javascript test page for this if you're interested.
For my application (a [free] web-based classical music tagger for MC, still in its early infancy), I need authentication to be able to do File/SetInfo. I see the following options:
- 1. Use a local or remote web server to serve my app, and I then need full CORS support (i.e. with preflight). Clean, but requires non-negligible work by the JRiver team., I was doing this until I ran into the CORS issue...
- 2. Use MC itself as the web server (I only need static web pages). This completely runs around the CORS issue, which is nice. The problem is that AFAIK there is no official place to drop files served by the MC web server. I am currently highjacking a subdirectory of Gizmo, but that's not a sustainable solution. This would require some new setting to point the MC web server to a non-JRiver folder.
Ideally, I would like to see both (1) and (2) happen. I'll be happy to get either (1) or (2). Any other approaches coming to mind?