Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-8882

CORS not supported for search API (both HTTP and HTTPS)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Normal Normal
    • None
    • None
    • Web service
    • None

      From the tickets I've seen, CORS support seems to be a goal for the web service APIs. However, when I run the following in the Chrome console on my site (which is HTTPS) I get the following:

      $.getJSON("https://search.musicbrainz.org/ws/2/artist/?fmt=json&query=rolling+stones", function(data){ console.log("done") }).fail(function(){ console.log("failed")}); 
      Object {readyState: 1}
      XMLHttpRequest cannot load https://search.musicbrainz.org/ws/2/artist/?fmt=json&query=rolling+stones. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://mappable.com' is therefore not allowed access.
      

      After testing on an HTTP site (jquery.com) it looks like HTTP also doesn't have the CORS headers:

      $.getJSON("http://search.musicbrainz.org/ws/2/artist/?fmt=json&query=rolling+stones", function(data){ console.log("done") }).fail(function(){ console.log("failed")}); 
      Object {readyState: 1}
      (index):1 XMLHttpRequest cannot load http://search.musicbrainz.org/ws/2/artist/?fmt=json&query=rolling+stones. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://jquery.com' is therefore not allowed access.
      

      Is this a regression? Are you planning to keep it available? Much appreciated and thank you for an outstanding service.

            Unassigned Unassigned
            orionr Orion Reblitz-Richardson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package