See [AWS docs](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html) for details on how this should work.