{"action":"closed","issue":{"url":"https://api.github.com/repos/sampsyo/beets/issues/1236","labels_url":"https://api.github.com/repos/sampsyo/beets/issues/1236/labels{/name}","comments_url":"https://api.github.com/repos/sampsyo/beets/issues/1236/comments","events_url":"https://api.github.com/repos/sampsyo/beets/issues/1236/events","html_url":"https://github.com/sampsyo/beets/issues/1236","id":54679747,"number":1236,"title":"Web Plugin Access-Control-Allow-Origin header not present","user":{"login":"andremiller","id":3374093,"avatar_url":"https://avatars.githubusercontent.com/u/3374093?v=3","gravatar_id":"","url":"https://api.github.com/users/andremiller","html_url":"https://github.com/andremiller","followers_url":"https://api.github.com/users/andremiller/followers","following_url":"https://api.github.com/users/andremiller/following{/other_user}","gists_url":"https://api.github.com/users/andremiller/gists{/gist_id}","starred_url":"https://api.github.com/users/andremiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andremiller/subscriptions","organizations_url":"https://api.github.com/users/andremiller/orgs","repos_url":"https://api.github.com/users/andremiller/repos","events_url":"https://api.github.com/users/andremiller/events{/privacy}","received_events_url":"https://api.github.com/users/andremiller/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sampsyo/beets/labels/feature","name":"feature","color":"e102d8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-17T23:30:24Z","updated_at":"2015-01-20T22:11:03Z","closed_at":"2015-01-20T22:11:03Z","body":"I'm putting together a client-side HTML5/Javascript player that uses the Web plugin's REST/JSON API.\r\n\r\nBecause the source files for the client is not hosted by the flask web server, I'm getting the following error in the browser when I try to make API calls using XMLHttpRequest in Javascript:\r\n\r\n>XMLHttpRequest cannot load http://beets:8337/item/716. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://musicplayer:9000' is therefore not allowed access.\r\n\r\nIs there a way the beets web server can be configured to provide this header so remote browsers can access the API?\r\n\r\nPS: I found this link which has an example of how to implement it in Flask: http://flask.pocoo.org/snippets/56/\r\n\r\n"}}