{"action":"created","issue":{"url":"https://api.github.com/repos/midasplatform/Midas/issues/84","labels_url":"https://api.github.com/repos/midasplatform/Midas/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/midasplatform/Midas/issues/84/comments","events_url":"https://api.github.com/repos/midasplatform/Midas/issues/84/events","html_url":"https://github.com/midasplatform/Midas/issues/84","id":53900940,"number":84,"title":"CORS violation when using REST API","user":{"login":"dblezek","id":76340,"avatar_url":"https://avatars.githubusercontent.com/u/76340?v=3","gravatar_id":"","url":"https://api.github.com/users/dblezek","html_url":"https://github.com/dblezek","followers_url":"https://api.github.com/users/dblezek/followers","following_url":"https://api.github.com/users/dblezek/following{/other_user}","gists_url":"https://api.github.com/users/dblezek/gists{/gist_id}","starred_url":"https://api.github.com/users/dblezek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dblezek/subscriptions","organizations_url":"https://api.github.com/users/dblezek/orgs","repos_url":"https://api.github.com/users/dblezek/repos","events_url":"https://api.github.com/users/dblezek/events{/privacy}","received_events_url":"https://api.github.com/users/dblezek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jamiesnape","id":3630149,"avatar_url":"https://avatars.githubusercontent.com/u/3630149?v=3","gravatar_id":"","url":"https://api.github.com/users/jamiesnape","html_url":"https://github.com/jamiesnape","followers_url":"https://api.github.com/users/jamiesnape/followers","following_url":"https://api.github.com/users/jamiesnape/following{/other_user}","gists_url":"https://api.github.com/users/jamiesnape/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiesnape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiesnape/subscriptions","organizations_url":"https://api.github.com/users/jamiesnape/orgs","repos_url":"https://api.github.com/users/jamiesnape/repos","events_url":"https://api.github.com/users/jamiesnape/events{/privacy}","received_events_url":"https://api.github.com/users/jamiesnape/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2015-01-09T18:48:59Z","updated_at":"2015-01-09T20:37:13Z","closed_at":null,"body":"I would like to use the REST api to request data from MIDAS3, all works well\r\nuntil I ask for the contents of a bitstream using this URL:\r\n\r\nhttp://slicer.kitware.com/midas3/rest/bitstream/download/206209?token=z1Fox3UzXORN4BJUfoGH08ZN94Hsb8zCfWmqJDXa\r\n\r\nMIDAS re-directs outside the /rest, CORS-aware section of MIDAS to\r\n\r\nhttp://slicer.kitware.com/midas3/rest/bitstream/download/206209?token=z1Fox3UzXORN4BJUfoGH08ZN94Hsb8zCfWmqJDXa&appname=mrml-drop&email=daniel.blezek%40gmail.com&apikey=uO0824aTAB7SUhnMQoQYzXxtx2lM1jXt5GwcX1lO\r\n\r\nand Firefox unceremoniously pukes with a CORS warning:\r\n\r\nCross-Origin Request Blocked: The Same Origin Policy disallows reading the\r\nremote resource at\r\nhttp://slicer.kitware.com/midas3/download/?bitstream=206209&offset=0&name=DWIVolume.mrb&authToken=z1Fox3UzXORN4BJUfoGH08ZN94Hsb8zCfWmqJDXa.\r\nThis can be fixed by moving the resource to the same domain or enabling CORS.\r\n\r\nWould it be possible to stream directly rather than redirect?  The browser can\r\ndisplay without problem, but XMLHttpRequest objects can't.\r\n\r\nThanks,\r\n-dan"},"comment":{"url":"https://api.github.com/repos/midasplatform/Midas/issues/comments/69395066","html_url":"https://github.com/midasplatform/Midas/issues/84#issuecomment-69395066","issue_url":"https://api.github.com/repos/midasplatform/Midas/issues/84","id":69395066,"user":{"login":"dblezek","id":76340,"avatar_url":"https://avatars.githubusercontent.com/u/76340?v=3","gravatar_id":"","url":"https://api.github.com/users/dblezek","html_url":"https://github.com/dblezek","followers_url":"https://api.github.com/users/dblezek/followers","following_url":"https://api.github.com/users/dblezek/following{/other_user}","gists_url":"https://api.github.com/users/dblezek/gists{/gist_id}","starred_url":"https://api.github.com/users/dblezek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dblezek/subscriptions","organizations_url":"https://api.github.com/users/dblezek/orgs","repos_url":"https://api.github.com/users/dblezek/repos","events_url":"https://api.github.com/users/dblezek/events{/privacy}","received_events_url":"https://api.github.com/users/dblezek/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T20:37:13Z","updated_at":"2015-01-09T20:37:13Z","body":"Thanks for looking into it.  Much appreciated."}}