{"action":"created","issue":{"url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/600","labels_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/600/labels{/name}","comments_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/600/comments","events_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/600/events","html_url":"https://github.com/simplabs/ember-simple-auth/issues/600","id":99044382,"number":600,"title":"CORS Cookie","user":{"login":"philippmayrth","id":1881353,"avatar_url":"https://avatars.githubusercontent.com/u/1881353?v=3","gravatar_id":"","url":"https://api.github.com/users/philippmayrth","html_url":"https://github.com/philippmayrth","followers_url":"https://api.github.com/users/philippmayrth/followers","following_url":"https://api.github.com/users/philippmayrth/following{/other_user}","gists_url":"https://api.github.com/users/philippmayrth/gists{/gist_id}","starred_url":"https://api.github.com/users/philippmayrth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philippmayrth/subscriptions","organizations_url":"https://api.github.com/users/philippmayrth/orgs","repos_url":"https://api.github.com/users/philippmayrth/repos","events_url":"https://api.github.com/users/philippmayrth/events{/privacy}","received_events_url":"https://api.github.com/users/philippmayrth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-04T19:34:06Z","updated_at":"2015-08-05T06:47:43Z","closed_at":null,"body":"Hi,\r\n\r\nawesome plugin!\r\ncan someone help me with activating a CORS Cookie? This is what I've tried so far:\r\n\r\n```\r\n// authorizers/custom.js\r\nimport Base from 'simple-auth/authorizers/base';\r\n\r\nexport default Base.extend({\r\n  authorize: function(jqXHR, requestOptions) {\r\n  \trequestOptions.withCredentials = true;\r\n  \tjqXHR.crossDomain = true;\r\n  }\r\n});\r\n```\r\n\r\n```\r\n// config/environment.js\r\n......\r\n\t'simple-auth': {\r\n\t\tauthorizer: 'authorizer:custom',\r\n\t\tcrossOriginWhitelist: ['http://localhost']\r\n\t},\r\n.....\r\n```\r\n\r\nAnd on the Server I added the header Access-Control-Allow-Credentials: true.\r\nNote: The rest of the CORS headers are already there and they are working only the CORS Cookie makes some problems.\r\n\r\nThanks for your advice.\r\nPhilipp"},"comment":{"url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/comments/127892243","html_url":"https://github.com/simplabs/ember-simple-auth/issues/600#issuecomment-127892243","issue_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/600","id":127892243,"user":{"login":"philippmayrth","id":1881353,"avatar_url":"https://avatars.githubusercontent.com/u/1881353?v=3","gravatar_id":"","url":"https://api.github.com/users/philippmayrth","html_url":"https://github.com/philippmayrth","followers_url":"https://api.github.com/users/philippmayrth/followers","following_url":"https://api.github.com/users/philippmayrth/following{/other_user}","gists_url":"https://api.github.com/users/philippmayrth/gists{/gist_id}","starred_url":"https://api.github.com/users/philippmayrth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philippmayrth/subscriptions","organizations_url":"https://api.github.com/users/philippmayrth/orgs","repos_url":"https://api.github.com/users/philippmayrth/repos","events_url":"https://api.github.com/users/philippmayrth/events{/privacy}","received_events_url":"https://api.github.com/users/philippmayrth/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T06:47:43Z","updated_at":"2015-08-05T06:47:43Z","body":"I´m running an Ember-Cli Dev Server on http://localhost:4200 and the api on http://localhost:80. The API uses Cookies for authentication, now always I wanted to test if an API Call is working I had to build the whole project and run it on http://localhost:80. That was quite annoying - but thats over now ;-)"}}