1 個回答
- 最新
- 最多得票
- 最多評論
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.
相關內容
- 已提問 7 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前