cors error in php code example
Example 1: header cros orgin using php
<?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: *");
...
Example 2: php strict-origin-when-cross-origin
header("Access-Control-Allow-Origin: *");
Example 3: php cors error
Access-Control-Allow-Headers does not allow * as accepted value, see the Mozilla Documentation here.
Instead of the asterisk, you should send the accepted headers (first X-Requested-With as the error says).