title: CORS impossible on AWS Lambda HTTP API Gateway Integration
body: <p>An AWS Lamba function (NodeJS) returning 3 HTTP headers: aaa, Access-Control-Allow-Origin and bbb was created:</p>
  
  <pre><code>exports.handler = async (event) =&gt; {
      const response = {
          statusCode: 200,
          headers: { "aaa":"aaa", "Access-Control-Allow-Origin":"*", "bbb":"bbb" },
          body: JSON.stringify('Hello from Lambda!'),
      };
      return response;
  };
  </code></pre>
  
  <p>The function is integrated into a HTTP API (not REST API). In the HTTP API Gateway Configuration, Section "Configure CORS", the HTTP header "Access-Control-Allow-Origin" was set to "*". Please see the screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/Xpg3O.png" rel="noreferrer">Gateway Config</a></p>
  
  <p>The command "curl -i <a href="https://xxxxxxxxxx.execute-api.eu-central-1.amazonaws.com" rel="noreferrer">https://xxxxxxxxxx.execute-api.eu-central-1.amazonaws.com</a>" proves that the HTTP Header Access-Control-Allow-Origin is explicitly removed, because only HTTP headers aaa and bbb are returned:</p>
  
  <pre><code>HTTP/2 200 
  date: Tue, 14 Apr 2020 11:01:58 GMT
  content-type: text/plain; charset=utf-8
  content-length: 20
  aaa: aaa
  bbb: bbb
  apigw-requestid: K-S2EjVWliAEJKw=
  </code></pre>
  
  <p>Why on earth is this header still not present, even after "Configure CORS" was done?</p>
  
  <p>(I'm googling now for more than two days in order to find a solution and it makes me go nuts)</p>