Enable CORS when using the AWS API Gateway Request Validator

I install the AWS API Gateway using CORS successfully when the request is valid. I have a 200 status code, as well as CORS headers, which is nice.

But when the AWS API Gateway Request Validator detects invalid input, I have a 400 status code, but CORS headers are not sent ...

This is really unsuccessful because the client sees CORS errors instead of a real 400 error (for example, the fetchclient cannot distinguish 400 errors due to CORS errors).

This question may be related to Get detailed error messages by checking the AWS API validator

+4
source share
1 answer

, CORS , API Gateway: https://github.com/serverless/serverless/issues/3896#issuecomment-333910525

, API-, API " ". 4XX 5XX.

API Gateway, Gateway Responses

400 API Gateway CORS, .

+2

Source: https://habr.com/ru/post/1693427/


All Articles