I've got a slimPHP REST API built. Here's what I have for headers:
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Credentials: true");
header('Access-Control-Allow-Headers: origin, content-type, accept');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT');
header('Access-Control-Max-Age: 86400');
Yet when I try a cross-domain PUT or DELETE request, all I get is (sample domains):
XMLHttpRequest cannot load http://www.example.com/api/x.
Origin http://www.example.com is not allowed by Access-Control-Allow-Origin.
Any idea why this is happening if Access-Control-Allow-Origin is set to * ?