{"action":"created","issue":{"url":"https://api.github.com/repos/emicklei/go-restful/issues/27","labels_url":"https://api.github.com/repos/emicklei/go-restful/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/emicklei/go-restful/issues/27/comments","events_url":"https://api.github.com/repos/emicklei/go-restful/issues/27/events","html_url":"https://github.com/emicklei/go-restful/issues/27","id":16726996,"number":27,"title":"How to enable CORS","user":{"login":"the42","id":160382,"avatar_url":"https://avatars.githubusercontent.com/u/160382?v=3","gravatar_id":"","url":"https://api.github.com/users/the42","html_url":"https://github.com/the42","followers_url":"https://api.github.com/users/the42/followers","following_url":"https://api.github.com/users/the42/following{/other_user}","gists_url":"https://api.github.com/users/the42/gists{/gist_id}","starred_url":"https://api.github.com/users/the42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the42/subscriptions","organizations_url":"https://api.github.com/users/the42/orgs","repos_url":"https://api.github.com/users/the42/repos","events_url":"https://api.github.com/users/the42/events{/privacy}","received_events_url":"https://api.github.com/users/the42/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2013-07-14T11:51:40Z","updated_at":"2015-09-17T21:19:40Z","closed_at":"2013-07-14T12:07:37Z","body":"in net/http I would do the following:\r\n\r\n\tif origin := req.Header.Get(\"Origin\"); origin != \"\" {\r\n\t\tw.Header().Set(\"Access-Control-Allow-Origin\", origin)\r\n\t}\r\n\r\nWhere is the right place to enable CORS in go-restful? I would assume a filter ..."},"comment":{"url":"https://api.github.com/repos/emicklei/go-restful/issues/comments/141231053","html_url":"https://github.com/emicklei/go-restful/issues/27#issuecomment-141231053","issue_url":"https://api.github.com/repos/emicklei/go-restful/issues/27","id":141231053,"user":{"login":"emicklei","id":686220,"avatar_url":"https://avatars.githubusercontent.com/u/686220?v=3","gravatar_id":"","url":"https://api.github.com/users/emicklei","html_url":"https://github.com/emicklei","followers_url":"https://api.github.com/users/emicklei/followers","following_url":"https://api.github.com/users/emicklei/following{/other_user}","gists_url":"https://api.github.com/users/emicklei/gists{/gist_id}","starred_url":"https://api.github.com/users/emicklei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emicklei/subscriptions","organizations_url":"https://api.github.com/users/emicklei/orgs","repos_url":"https://api.github.com/users/emicklei/repos","events_url":"https://api.github.com/users/emicklei/events{/privacy}","received_events_url":"https://api.github.com/users/emicklei/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T21:19:40Z","updated_at":"2015-09-17T21:19:40Z","body":"i think the OPTIONSFilter is no longer needed (in the example). Have to verify that."}}