{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/6075","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/6075/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/6075/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/6075/events","html_url":"https://github.com/cakephp/cakephp/issues/6075","id":61640042,"number":6075,"title":"Autogenerate OPTIONS Response","user":{"login":"DSchalla","id":5972329,"avatar_url":"https://avatars.githubusercontent.com/u/5972329?v=3","gravatar_id":"","url":"https://api.github.com/users/DSchalla","html_url":"https://github.com/DSchalla","followers_url":"https://api.github.com/users/DSchalla/followers","following_url":"https://api.github.com/users/DSchalla/following{/other_user}","gists_url":"https://api.github.com/users/DSchalla/gists{/gist_id}","starred_url":"https://api.github.com/users/DSchalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DSchalla/subscriptions","organizations_url":"https://api.github.com/users/DSchalla/orgs","repos_url":"https://api.github.com/users/DSchalla/repos","events_url":"https://api.github.com/users/DSchalla/events{/privacy}","received_events_url":"https://api.github.com/users/DSchalla/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-14T16:35:29Z","updated_at":"2015-03-14T17:25:26Z","closed_at":"2015-03-14T17:25:26Z","body":"Hello folks,\r\n\r\nAngularJS and other frameworks are sending an \"OPTIONS\" Request to the webserver to determine which methods are accepted. When using '$this->request->allowMethod(['post']);' etc OPTIONS requests are by default just forbidden. The OPTIONS Request is defiend in the CORS Specification, for anyone who is curious to read about it.\r\n\r\nInstead of ignoring them I would add as Config Flag for the CakePHP Application to respond with the appropiate headers to the request instead of throwing an 401.\r\n\r\nI would implement it the Core if the idea is supported by the core devs in a PR. \r\n\r\nRegards,\r\nDaniel"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/80613372","html_url":"https://github.com/cakephp/cakephp/issues/6075#issuecomment-80613372","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/6075","id":80613372,"user":{"login":"DSchalla","id":5972329,"avatar_url":"https://avatars.githubusercontent.com/u/5972329?v=3","gravatar_id":"","url":"https://api.github.com/users/DSchalla","html_url":"https://github.com/DSchalla","followers_url":"https://api.github.com/users/DSchalla/followers","following_url":"https://api.github.com/users/DSchalla/following{/other_user}","gists_url":"https://api.github.com/users/DSchalla/gists{/gist_id}","starred_url":"https://api.github.com/users/DSchalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DSchalla/subscriptions","organizations_url":"https://api.github.com/users/DSchalla/orgs","repos_url":"https://api.github.com/users/DSchalla/repos","events_url":"https://api.github.com/users/DSchalla/events{/privacy}","received_events_url":"https://api.github.com/users/DSchalla/received_events","type":"User","site_admin":false},"created_at":"2015-03-14T17:25:26Z","updated_at":"2015-03-14T17:25:26Z","body":"After having a talk with @ceeram I realized that it is more appropriate to handle them on your own in the application. Thanks @ceeram!"}}