I have a simple PHP script that I am attempting a cross-domain CORS request:
I got the same error, and fixed it with the following PHP in my back-end script:
header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, POST'); header("Access-Control-Allow-Headers: X-Requested-With");