{"action":"created","issue":{"url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/278","labels_url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/278/labels{/name}","comments_url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/278/comments","events_url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/278/events","html_url":"https://github.com/apigee-127/swagger-tools/issues/278","id":105866562,"number":278,"title":"Handle CORS OPTIONS call","user":{"login":"akras14","id":2300832,"avatar_url":"https://avatars.githubusercontent.com/u/2300832?v=3","gravatar_id":"","url":"https://api.github.com/users/akras14","html_url":"https://github.com/akras14","followers_url":"https://api.github.com/users/akras14/followers","following_url":"https://api.github.com/users/akras14/following{/other_user}","gists_url":"https://api.github.com/users/akras14/gists{/gist_id}","starred_url":"https://api.github.com/users/akras14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akras14/subscriptions","organizations_url":"https://api.github.com/users/akras14/orgs","repos_url":"https://api.github.com/users/akras14/repos","events_url":"https://api.github.com/users/akras14/events{/privacy}","received_events_url":"https://api.github.com/users/akras14/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-10T18:13:38Z","updated_at":"2015-09-10T18:27:13Z","closed_at":"2015-09-10T18:22:19Z","body":"This is more of a question, than an issue. We are currently switching our API's from swagger-node-express to swagger-tools, and run into issue with CORS requests. \r\n\r\nIt looks like express automatically adds Allow headers based on which methods are defined in routes. Something like: \r\n\r\nhttps://github.com/strongloop/express/blob/11a77a3fffb0476a460c4e68536ce20f5b3c542f/lib/router/index.js#L623\r\n```\r\n// send an OPTIONS response\r\nfunction sendOptionsResponse(res, options, next) {\r\n  try {\r\n    var body = options.join(',');\r\n    res.set('Allow', body);\r\n    res.send(body);\r\n  } catch (err) {\r\n    next(err);\r\n  }\r\n}\r\n```\r\n\r\nSwagger-tools, does not appear to provide same functionality (or may be I overlooked it). I was just curious if: \r\n\r\n1. You are providing this option already, (and it just didn't work in our modified version)\r\n2. If you do not currently provide it, if you plan on adding this in, or if we should handle it outside of the swagger tools flow (either via a custom middleware or Nginx config)."},"comment":{"url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/comments/139335822","html_url":"https://github.com/apigee-127/swagger-tools/issues/278#issuecomment-139335822","issue_url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/278","id":139335822,"user":{"login":"akras14","id":2300832,"avatar_url":"https://avatars.githubusercontent.com/u/2300832?v=3","gravatar_id":"","url":"https://api.github.com/users/akras14","html_url":"https://github.com/akras14","followers_url":"https://api.github.com/users/akras14/followers","following_url":"https://api.github.com/users/akras14/following{/other_user}","gists_url":"https://api.github.com/users/akras14/gists{/gist_id}","starred_url":"https://api.github.com/users/akras14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akras14/subscriptions","organizations_url":"https://api.github.com/users/akras14/orgs","repos_url":"https://api.github.com/users/akras14/repos","events_url":"https://api.github.com/users/akras14/events{/privacy}","received_events_url":"https://api.github.com/users/akras14/received_events","type":"User","site_admin":false},"created_at":"2015-09-10T18:27:13Z","updated_at":"2015-09-10T18:27:13Z","body":"Perfect, thanks for a quick response."}}