I built a simple RESTful endpoint using AWS Lambda and API gateway. API Gateway has CORS enabled, and the client is sending the proper headers as described here
The client app was built in Django and uses JQuery:
$.ajax({
type: 'GET',
url: baseUrl,
crossDomain: true,
contentType: 'application/json'
})
Also, the Lambda function itself returns the following payload:
return {
'statusCode': 200,
'headers': {
'Content-Type': 'application/json',
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Credentials": "true"
},
'body': json.dumps(json_response)
}
Chrome is still throwing a CORS error:
No 'Access-Control-Allow-Origin' header is present on the requested resource
Am I missing something?