{"action":"created","issue":{"url":"https://api.github.com/repos/basho/riak_cs/issues/581","labels_url":"https://api.github.com/repos/basho/riak_cs/issues/581/labels{/name}","comments_url":"https://api.github.com/repos/basho/riak_cs/issues/581/comments","events_url":"https://api.github.com/repos/basho/riak_cs/issues/581/events","html_url":"https://github.com/basho/riak_cs/issues/581","id":15135111,"number":581,"title":"Support CORS [JIRA: RCS-177]","user":{"login":"reiddraper","id":200355,"avatar_url":"https://avatars.githubusercontent.com/u/200355?v=3","gravatar_id":"","url":"https://api.github.com/users/reiddraper","html_url":"https://github.com/reiddraper","followers_url":"https://api.github.com/users/reiddraper/followers","following_url":"https://api.github.com/users/reiddraper/following{/other_user}","gists_url":"https://api.github.com/users/reiddraper/gists{/gist_id}","starred_url":"https://api.github.com/users/reiddraper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reiddraper/subscriptions","organizations_url":"https://api.github.com/users/reiddraper/orgs","repos_url":"https://api.github.com/users/reiddraper/repos","events_url":"https://api.github.com/users/reiddraper/events{/privacy}","received_events_url":"https://api.github.com/users/reiddraper/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/basho/riak_cs/labels/Enhancement","name":"Enhancement","color":"207de5"},{"url":"https://api.github.com/repos/basho/riak_cs/labels/JIRA:%20To%20Do","name":"JIRA: To Do","color":"ededed"},{"url":"https://api.github.com/repos/basho/riak_cs/labels/Kanban-Backlog","name":"Kanban-Backlog","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/basho/riak_cs/milestones/8","html_url":"https://github.com/basho/riak_cs/milestones/2.3.0","labels_url":"https://api.github.com/repos/basho/riak_cs/milestones/8/labels","id":406400,"number":8,"title":"2.3.0","description":"","creator":{"login":"kellymclaughlin","id":29337,"avatar_url":"https://avatars.githubusercontent.com/u/29337?v=3","gravatar_id":"","url":"https://api.github.com/users/kellymclaughlin","html_url":"https://github.com/kellymclaughlin","followers_url":"https://api.github.com/users/kellymclaughlin/followers","following_url":"https://api.github.com/users/kellymclaughlin/following{/other_user}","gists_url":"https://api.github.com/users/kellymclaughlin/gists{/gist_id}","starred_url":"https://api.github.com/users/kellymclaughlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellymclaughlin/subscriptions","organizations_url":"https://api.github.com/users/kellymclaughlin/orgs","repos_url":"https://api.github.com/users/kellymclaughlin/repos","events_url":"https://api.github.com/users/kellymclaughlin/events{/privacy}","received_events_url":"https://api.github.com/users/kellymclaughlin/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2013-08-20T17:52:25Z","updated_at":"2015-04-28T13:36:55Z","due_on":null,"closed_at":null},"comments":18,"created_at":"2013-06-04T18:58:27Z","updated_at":"2015-07-29T21:46:19Z","closed_at":null,"body":"Add support for [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing)\r\n\r\n[S3 CORS docs](http://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html).\r\n\r\n[W3C CORS doc](http://www.w3.org/TR/cors/)"},"comment":{"url":"https://api.github.com/repos/basho/riak_cs/issues/comments/126106202","html_url":"https://github.com/basho/riak_cs/issues/581#issuecomment-126106202","issue_url":"https://api.github.com/repos/basho/riak_cs/issues/581","id":126106202,"user":{"login":"sdebnath","id":59411,"avatar_url":"https://avatars.githubusercontent.com/u/59411?v=3","gravatar_id":"","url":"https://api.github.com/users/sdebnath","html_url":"https://github.com/sdebnath","followers_url":"https://api.github.com/users/sdebnath/followers","following_url":"https://api.github.com/users/sdebnath/following{/other_user}","gists_url":"https://api.github.com/users/sdebnath/gists{/gist_id}","starred_url":"https://api.github.com/users/sdebnath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdebnath/subscriptions","organizations_url":"https://api.github.com/users/sdebnath/orgs","repos_url":"https://api.github.com/users/sdebnath/repos","events_url":"https://api.github.com/users/sdebnath/events{/privacy}","received_events_url":"https://api.github.com/users/sdebnath/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T21:46:19Z","updated_at":"2015-07-29T21:46:19Z","body":"Thanks for the feedback @kuenishi. Going to try to inline comments here:\r\n\r\n1. DELETE /?cors: makes sense, added to doc\r\n2. s3:PutCORSConfiguration header: okay, makes sense. If I have questions, I will ping you.\r\n3. options/2 in riak_cs_wm_common: yep, that was the approach I was planning on taking. riak_cs_wm_common has the shared entry points, which then calls to appropriate resources. I was planning on filtering processing of options and restrict it to bucket/object resources. And yes you are correct, regardless of sub-resource, the options will be evaluated on the bucket and then proceed to regular acl and other checks where sub-resource existence is checked today.\r\n4. Re Allow-Origin header: Per specs, the server can return  \"Origin request header, \"*\", or \"null\"). What I proposed is not illegal behavior as we would be passing the back origin request header sent by client instead of the riak setting of '*'.  I believe we should be good.\r\n5. Regarding keeping it simple and not matching S3: agreed. This feature is simple enough that we can follow the actual guidelines set forth in the CORS spec. It might break S3 compatibility but actually meets the major browser requirements out there today.\r\n6. Regarding updates via stanchion, yep that's the plan as documented in the design doc. \r\n\r\nTidying up some loose ends at work, will jump on this soon. \r\n\r\nThanks!"}}