CORS and HTTP authentication
问题 I'm trying make some ajax queries from domain A to domain B which is behind HTTP basic auth Here is my Jquery (1.9.1) ajax call jQuery.ajax({ method : "POST", data: s, withCredentials: true, headers: { "Authorization" : "Basic " + btoa('user:pass') }, url: "http://domainB/script.php", success: function(data){ console.log(data); } }); And script.php <?php header('Access-Control-Allow-Origin: http://domainA'); header('Access-Control-Allow-Methods: POST'); header('Access-Control-Allow