{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/19832","labels_url":"https://api.github.com/repos/rails/rails/issues/19832/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/19832/comments","events_url":"https://api.github.com/repos/rails/rails/issues/19832/events","html_url":"https://github.com/rails/rails/pull/19832","id":69666057,"number":19832,"title":"Rails api","user":{"login":"dhh","id":2741,"avatar_url":"https://avatars.githubusercontent.com/u/2741?v=3","gravatar_id":"","url":"https://api.github.com/users/dhh","html_url":"https://github.com/dhh","followers_url":"https://api.github.com/users/dhh/followers","following_url":"https://api.github.com/users/dhh/following{/other_user}","gists_url":"https://api.github.com/users/dhh/gists{/gist_id}","starred_url":"https://api.github.com/users/dhh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhh/subscriptions","organizations_url":"https://api.github.com/users/dhh/orgs","repos_url":"https://api.github.com/users/dhh/repos","events_url":"https://api.github.com/users/dhh/events{/privacy}","received_events_url":"https://api.github.com/users/dhh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/actionpack","name":"actionpack","color":"FFF700"},{"url":"https://api.github.com/repos/rails/rails/labels/railties","name":"railties","color":"8BE06E"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rails/rails/milestones/34","html_url":"https://github.com/rails/rails/milestones/5.0.0","labels_url":"https://api.github.com/repos/rails/rails/milestones/34/labels","id":665192,"number":34,"title":"5.0.0","description":null,"creator":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"open_issues":94,"closed_issues":100,"state":"open","created_at":"2014-05-21T00:58:22Z","updated_at":"2015-05-04T15:04:28Z","due_on":null,"closed_at":null},"comments":45,"created_at":"2015-04-20T19:48:51Z","updated_at":"2015-05-16T13:12:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/19832","html_url":"https://github.com/rails/rails/pull/19832","diff_url":"https://github.com/rails/rails/pull/19832.diff","patch_url":"https://github.com/rails/rails/pull/19832.patch"},"body":"[Description extracted from http://wyeworks.com/blog/2015/4/20/rails-api-is-going-to-be-included-in-rails-5/]\r\n\r\nA decision was made to incorporate Rails API into Rails core 🎉 🎉 🎉.\r\n\r\n# What Is Rails API?\r\n\r\nThe original idea behind Rails API was to serve as a starting point for a version of Rails better suited for JS-heavy apps. As of today, Rails API provides: trimmed down controllers and middleware stack together with a matching set of generators, all specifically tailored for API type applications.\r\n\r\n# Next steps\r\n\r\nWe still need to discuss the “Rails way” for API applications, how API apps should be built and, what features we’d like included from our original list of ideas. In particular:\r\n\r\n* Do we want to avoid asset generation in Rails by having a back-end and a front-end apps?\r\n* Do we prefer to have a single application and keep asset generation in Rails instead?\r\n* Do we like Active Model Serializers better than Jbuilder?\r\n* If not, can we make Rails API play nicely with Jbuilder?"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/102625207","html_url":"https://github.com/rails/rails/pull/19832#issuecomment-102625207","issue_url":"https://api.github.com/repos/rails/rails/issues/19832","id":102625207,"user":{"login":"kenips","id":794915,"avatar_url":"https://avatars.githubusercontent.com/u/794915?v=3","gravatar_id":"","url":"https://api.github.com/users/kenips","html_url":"https://github.com/kenips","followers_url":"https://api.github.com/users/kenips/followers","following_url":"https://api.github.com/users/kenips/following{/other_user}","gists_url":"https://api.github.com/users/kenips/gists{/gist_id}","starred_url":"https://api.github.com/users/kenips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenips/subscriptions","organizations_url":"https://api.github.com/users/kenips/orgs","repos_url":"https://api.github.com/users/kenips/repos","events_url":"https://api.github.com/users/kenips/events{/privacy}","received_events_url":"https://api.github.com/users/kenips/received_events","type":"User","site_admin":false},"created_at":"2015-05-16T13:12:54Z","updated_at":"2015-05-16T13:12:54Z","body":"@yuki24 @ekampp you guys are correct, CORS shouldn't be used for authentication / authorization. The spec is designed for allowing request of resources from a different origin (domain). In this case it would matter IF your entire front-end application / SPA is hosted on a different domain, which is a configuration gaining popularity (say www.example.com for your front-end app / SPA and api.example.com for your Rails api app).\r\n\r\nPreviously we have been using the Rails assets pipeline to manage our front-end app / SPA and hence they would be under the same domain. Some frameworks have even suggested to use of proxying /api to the backend to keep requests in the same domain. However, given the support of full \"API only server\" in here and returning assets management back to front-end frameworks, I can only see the trend of deploy front-end and back-end into separate domains rise."}}