Closed DriesS closed 8 years ago
Could you please add the -v argument to your curl command and post the response?
I am using extjs 6 gpl and I get same problem Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response. Access-Control-Request-He... content-type,x-requested-with
@DriesS i think the problem is due to two things:
Your AJAX call should be something like this:
var xmlhttp = new XMLHttpRequest();
xmlhttp.open(method, url, true);
xmlhttp.withCredentials = true;
xmlhttp.setRequestHeader('Content-type', 'application/json');
xmlhttp.send(' { "param" : "blah blah blah" } ');
At least, i can say that i was having the same issue and those two things fixed the problem.
Hi,
I'm using the falcon-cors middleware but I still get :
I configured the api that all headers are allowed :
and here my post method :
What do I do wrong? Here you can find a curl from my api call :