Enable CORS when using AWS API Gateway Request Validator

假装没事ソ 提交于 2019-12-04 08:16:15

I came to this answer through a discussion about using serverless to deploy CORS services and dealing with errors thrown from API Gateway: https://github.com/serverless/serverless/issues/3896#issuecomment-333910525

Basically, you need to go to API Gateway, select your API, then select Gateway Responses. You can then add headers for any 4XX or 5XX response.

This will allow 400 errors thrown from API Gateway to work with CORS, since you're adding the needed headers here.

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