{"action":"created","issue":{"url":"https://api.github.com/repos/dherault/serverless-offline/issues/94","repository_url":"https://api.github.com/repos/dherault/serverless-offline","labels_url":"https://api.github.com/repos/dherault/serverless-offline/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/dherault/serverless-offline/issues/94/comments","events_url":"https://api.github.com/repos/dherault/serverless-offline/issues/94/events","html_url":"https://github.com/dherault/serverless-offline/issues/94","id":174777687,"number":94,"title":"Didn't Return CORS from OPTIONS method","user":{"login":"rroqueCoddera","id":13629616,"avatar_url":"https://avatars.githubusercontent.com/u/13629616?v=3","gravatar_id":"","url":"https://api.github.com/users/rroqueCoddera","html_url":"https://github.com/rroqueCoddera","followers_url":"https://api.github.com/users/rroqueCoddera/followers","following_url":"https://api.github.com/users/rroqueCoddera/following{/other_user}","gists_url":"https://api.github.com/users/rroqueCoddera/gists{/gist_id}","starred_url":"https://api.github.com/users/rroqueCoddera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rroqueCoddera/subscriptions","organizations_url":"https://api.github.com/users/rroqueCoddera/orgs","repos_url":"https://api.github.com/users/rroqueCoddera/repos","events_url":"https://api.github.com/users/rroqueCoddera/events{/privacy}","received_events_url":"https://api.github.com/users/rroqueCoddera/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-02T14:49:15Z","updated_at":"2016-09-06T22:28:31Z","closed_at":null,"body":"I'm calling a method POST that has a OPTIONS method together and cors from a OPTIONS method returns wrong.\r\n\r\nThat's my configuration on serverless.yml:\r\n\r\n> functions:\r\n>   load:\r\n>     handler: handler.main\r\n>     events:\r\n>       - http:\r\n>            path: /load\r\n>            method: POST\r\n>            cors: true\r\n>       - http:\r\n>            path: /load\r\n>            method: OPTIONS\r\n>            cors: true\r\n> \r\n\r\nReturn:\r\n\r\n> \r\n> Request URL:http://localhost:3000/load\r\n> Request Method:OPTIONS\r\n> Status Code:200 OK\r\n> Remote Address:127.0.0.1:3000\r\n> \r\n> Response Header\r\n> access-control-allow-credentials:true\r\n> access-control-allow-origin:null\r\n> access-control-expose-headers:WWW-Authenticate,Server-Authorization\r\n> cache-control:no-cache\r\n> Connection:keep-alive\r\n> content-encoding:gzip\r\n> content-type:application/json; charset=utf-8\r\n> Date:Fri, 02 Sep 2016 14:47:32 GMT\r\n> Transfer-Encoding:chunked\r\n> vary:origin,accept-encoding\r\n\r\n\r\nI'm making the request from a web page, because with postman works fine.\r\n\r\nis it a bug?\r\n"},"comment":{"url":"https://api.github.com/repos/dherault/serverless-offline/issues/comments/245116010","html_url":"https://github.com/dherault/serverless-offline/issues/94#issuecomment-245116010","issue_url":"https://api.github.com/repos/dherault/serverless-offline/issues/94","id":245116010,"user":{"login":"rroqueCoddera","id":13629616,"avatar_url":"https://avatars.githubusercontent.com/u/13629616?v=3","gravatar_id":"","url":"https://api.github.com/users/rroqueCoddera","html_url":"https://github.com/rroqueCoddera","followers_url":"https://api.github.com/users/rroqueCoddera/followers","following_url":"https://api.github.com/users/rroqueCoddera/following{/other_user}","gists_url":"https://api.github.com/users/rroqueCoddera/gists{/gist_id}","starred_url":"https://api.github.com/users/rroqueCoddera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rroqueCoddera/subscriptions","organizations_url":"https://api.github.com/users/rroqueCoddera/orgs","repos_url":"https://api.github.com/users/rroqueCoddera/repos","events_url":"https://api.github.com/users/rroqueCoddera/events{/privacy}","received_events_url":"https://api.github.com/users/rroqueCoddera/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T22:28:31Z","updated_at":"2016-09-06T22:28:31Z","body":"No, browser will send OPTIONS before a POST, so we have to treat correctly CORS on OPTIONS method."}}
{"actor":{"display_login":"rroqueCoddera"}}