I tried by configuring 'Enable CORS' in API Gateway and set all the required headers as well. In the Lambda function, I set headers like Access-Control-Allow-Origin, Access-Control-Allow-Methods, Access-Control-Allow-Headers?
Preflight request hasnt been sent to the Lambda function from API Gateway. Is there anything that I need to check and configure?
Kindly help me out. Thanks in advance
def lambda_handler(event, context):
return {
"statusCode": "200",
"headers": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Headers": "*",
},
"body": json.dumps({"test": "123"})
}