1 Answer
- Newest
- Most votes
- Most comments
1
Hi,
As described on the AWS documentation, Cross-origin resource sharing (CORS) is a browser security feature that restricts cross-origin HTTP requests that are initiated from scripts running in the browser. In your case, from localhost to the API Gateway domain.
In order to fix it, your API response must include the Access-Control-Allow-Origin
header, with the allowed domain name as value.
Thus, I recommend you take a look at the following Knowledge Center article, which described step by step how to troubleshoot the No ‘Access-Control-Allow-Origin’ header present CORS error, describing the possible causes as well as how to solve it for both HTTP and REST APIs.
Relevant content
- asked 10 months ago
- Accepted Answerasked 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago