$.ajax({
url: "http://www.mryl.com/api/v1/user/info/13422",
headers: {'Authorization': 'Basic bmVvd2F5Oe4lb3dheQ=='},
type: "GET",
success: function (data) {
//console.log(data)
}
});
php
header("Access-Control-Allow-Origin: *");
header('Access-Control-Allow-Headers:Authorization');
header("Access-Control-Allow-Methods: GET, POST, DELETE");
header("Access-Control-Allow-Credentials: true");
header("Access-Control-Allow-Headers: Content-Type, X-Requested-With, Cache-Control,Authorization");
php
获取不到Authorization值 最佳答案
