{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/19135","labels_url":"https://api.github.com/repos/rails/rails/issues/19135/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/19135/comments","events_url":"https://api.github.com/repos/rails/rails/issues/19135/events","html_url":"https://github.com/rails/rails/pull/19135","id":59366035,"number":19135,"title":"Add basic support for access control headers to ActionDispatch::Static","user":{"login":"yuki24","id":386234,"avatar_url":"https://avatars.githubusercontent.com/u/386234?v=3","gravatar_id":"","url":"https://api.github.com/users/yuki24","html_url":"https://github.com/yuki24","followers_url":"https://api.github.com/users/yuki24/followers","following_url":"https://api.github.com/users/yuki24/following{/other_user}","gists_url":"https://api.github.com/users/yuki24/gists{/gist_id}","starred_url":"https://api.github.com/users/yuki24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuki24/subscriptions","organizations_url":"https://api.github.com/users/yuki24/orgs","repos_url":"https://api.github.com/users/yuki24/repos","events_url":"https://api.github.com/users/yuki24/events{/privacy}","received_events_url":"https://api.github.com/users/yuki24/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/actionpack","name":"actionpack","color":"FFF700"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-28T23:30:46Z","updated_at":"2015-03-03T02:53:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/19135","html_url":"https://github.com/rails/rails/pull/19135","diff_url":"https://github.com/rails/rails/pull/19135.diff","patch_url":"https://github.com/rails/rails/pull/19135.patch"},"body":"Now ActionDispatch::Static can accept access control headers such as `Access-Control-Allow-Origin`. These headers will be set as well as `Cache-Control` header when a response is delivered. Access control headers can be configured with `#config` in `config/application.rb` or `config/environments/***.rb`:\r\n\r\n```ruby\r\nconfig.action_dispatch.access_control_headers = {\r\n  \"Access-Control-Allow-Origin\"      => 'http://rubyonrails.org',\r\n  \"Access-Control-Expose-Headers\"    => 'X-Other-Custom-Header',\r\n  \"Access-Control-Allow-Headers\"     => 'X-Another-Custom-Header',\r\n  \"Access-Control-Max-Age\"           => '42',\r\n  \"Access-Control-Allow-Credentials\" => 'true',\r\n  \"Access-Control-Allow-Methods\"     => 'GET'\r\n}\r\n```\r\n\r\ncc/ @schneems "},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/76877596","html_url":"https://github.com/rails/rails/pull/19135#issuecomment-76877596","issue_url":"https://api.github.com/repos/rails/rails/issues/19135","id":76877596,"user":{"login":"yuki24","id":386234,"avatar_url":"https://avatars.githubusercontent.com/u/386234?v=3","gravatar_id":"","url":"https://api.github.com/users/yuki24","html_url":"https://github.com/yuki24","followers_url":"https://api.github.com/users/yuki24/followers","following_url":"https://api.github.com/users/yuki24/following{/other_user}","gists_url":"https://api.github.com/users/yuki24/gists{/gist_id}","starred_url":"https://api.github.com/users/yuki24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuki24/subscriptions","organizations_url":"https://api.github.com/users/yuki24/orgs","repos_url":"https://api.github.com/users/yuki24/repos","events_url":"https://api.github.com/users/yuki24/events{/privacy}","received_events_url":"https://api.github.com/users/yuki24/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T02:53:56Z","updated_at":"2015-03-03T02:53:56Z","body":"Updated the commit as suggested. Thanks @schneems for reviewing!"}}