I am learning react. I run into a strange problem. In react, it makes an HTTP GET call to backend API (AWS Apigateway + lambda). I got a CORS error response. I tested my backend API with Postman. The Access-Control-Allow-Origin has been set to *. What is wrong here? Here is my code React
const { data } = await axios(url, {
method: 'GET',
mode: 'no-cors',
crossdomain: true,
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
},
withCredentials: false
});
postman response

