Can't enable CORS on Lambda + API Gateway + Cloudfront on the Cloudfront layer

百般思念 提交于 2019-12-02 10:16:38

Go into your CloudFront distribution, click behaviours, select each behaviour and click edit, you'll see the section titled whitelist headers. Select 'Access-Control-Request-Headers' and 'Access-Control-request-methods' and click Add, also add Origin(thanks Michael for the catch), bottom right click "yes, edit".

Edit: please see Michael's comment below regarding preventing cached responses.

Voila.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!