This is the error I see in my chrome console.
XMLHttpRequest can not load {URL}. Origin {URL} is not allowed by Access-Control-Allow-Origin.
I've tried to configure my NGINX for CORS:
location / {
if ($http_origin) {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods "GET,POST,OPTIONS";
}
But that doesn't seem to help.
The jquery call looks like this:
var submissionData = '{"tweet_id":"'+tweet_id+'", "question_id":"'+question_id+'", '+choiceString+', "extra_passback":"'+extra_passback+'"}';
$.post("http://ec2[...].amazonaws.com/question/answer/", submissionData, function(data) {console.log("success");});
I'm not even sure if the problem is with jquery or nginx.