1 Answer
- Newest
- Most votes
- Most comments
0
The error message indicates that there is a CORS (Cross-Origin Resource Sharing) issue. The PATCH request from the API Gateway console is being blocked due to the API Gateway not allowing the PATCH method in the Access-Control-Allow-Methods header.
To fix this issue, you will need to configure the CORS settings for your API Gateway to allow the PATCH method. Here are the steps:
- Go to the API Gateway console in the AWS Management Console.
- Navigate to the API you are working with.
- Go to the "Stages" section and select the stage you are working with (e.g., "prod", "dev", etc.).
- In the stage details, find the "CORS" section.
- Click on the "Edit" button to modify the CORS configuration.
- In the "Access-Control-Allow-Methods" field, add the "PATCH" method in addition to any other methods you have already configured (e.g., "GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH").
- Save the changes.
answered a year ago
Relevant content
- asked 2 years ago
