title: Configuring CORS for API Gateway in SAM/CloudFormation/Swagger
body: <p>I followed the example from <a href="https://github.com/awslabs/serverless-application-model/tree/a71fc92754624d722f3216826df97a73403a4b7a/examples/2016-10-31/api_swagger_cors" rel="noreferrer">here</a> which includes a swagger file for configuration of CORS + SAM. It seems like I still get CORS error unless I add CORS headers manually into each function: </p>
  
  <pre><code>callback(null, {
      statusCode: '200',
      headers: {
          'Access-Control-Allow-Origin': '*',
          'Access-Control-Allow-Headers': 'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token',
          'Access-Control-Allow-Methods': 'OPTIONS,GET,POST,PUT,PATCH,DELETE'
      },
      body: JSON.stringify({message: "Hello world"})
  });
  </code></pre>
  
  <p>Is this correct? Or am I doing something wrong? </p>