title: Access-Control-Allow-Origin and Status code 403
body: <p>Is it possible to send <code>Access-Control-Allow-Origin</code> as part of response headers when 403 HTTP status code returned from API Gateway ?</p>
  <p>Solution</p>
  <p>Below Swagger Configuration needs to be added for the Gateway.</p>
  <pre><code>x-amazon-apigateway-gateway-responses:
    DEFAULT_4XX:
      statusCode: 403
      responseParameters:
        gatewayresponse.header.Access-Control-Allow-Origin: &quot;'*'&quot;
      responseTemplates:
        application/json: &quot;{\&quot;message\&quot;:$context.error.messageString}&quot;
  </code></pre>