CORS stopped working when upgrading from V2 to V3

We are trying to upgrade from V2 to V3 and we started getting CORS errors from our API Gateway. Looking over the documentation for “advanced usage” we have everything correct.

  events:
    - http:
        path: /authentication/referrer/validate
        method: get
        cors:
          origin: '*'
          headers:
            - Authorization
            - Content-Type
            - X-Api-Key
            - X-Amz-Date
            - X-Amz-Security-Token
            - X-Amz-User-Agent
            - x-auth-token
            - x-referrer-token
            - Cache-Control
            - Pragma
          allowCredentials: false
        private: false

We aren’t getting any errors, but we noticed that the Cache-Control and Pragma headers weren’t showing up on our API Gateway either.

I tried to check if this was something that changed in V3 but the link for full changes seems to have been removed. https://www.serverless.com/framework/docs/guides/upgrading-v3

Does anybody know how to resolve my CORS errors and/or where to find the full V3 notes?

@daynesuke I would recommend looking at the logs for your Lambda function. Usually when what you describe happens this is because the Lambda is returning a 5XX error code and the automated CORS implementation does not support that HTTP status code. Therefore, your browser receives a CORS error and not the error from the failed Lambda. Once your Lambda stops returning errors and actually returns the result from the Lambda function itself the CORS should stop.