I am getting this error in Chrome when trying to send an ajax request:
Content-Type is not allowed by Access-Control-Allow-Headers
Everythi
Solution for PHP:
header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: POST,GET,OPTIONS'); header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');
(Need to send that before any other content)