- Newest
- Most votes
- Most comments
My API is Rest API, and Lambda Proxy integration is checked. Also, I followed "Enable CORS on a resource using the API Gateway console"(https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors-console.html). So I think I don't need more action as "Configure your REST API integrations to return the required CORS header" in your link. However, It still does not work. if there is any mistake in my reaction, please let me know. Additionally, I deployed as well.
It works now. Thank you. As result, I did
- enable CORS in API Gateway.
- set header in response in Lambda return.
Please take a look at the following troubleshooting guide from AWS Premium Support - https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-cors-errors/
Please take a look at this document - https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html
the following paragraph
Enabling CORS support for Lambda or HTTP proxy integrations For a Lambda proxy integration or HTTP proxy integration, you can still set up the required OPTIONS response headers in API Gateway. However, your backend is responsible for returning the Access-Control-Allow-Origin and Access-Control-Allow-Headers headers, because a proxy integration doesn't return an integration response.
Since you mentioned you are using Proxy integration, is your backend returning these headers.
Relevant content
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 9 months ago