I am using $http.post() to access an api but I get the response back
XMLHttpRequest cannot load http://tester.com/cp/api/index.php?action=1. Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.
And I have added <?php header('Access-Control-Allow-Origin: *'); ?>
to the index.php.
I don't know why it is not working.