Amazon S3 是否允许自定义 header ?还是我运气不好?
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Headers: X-SOMETHING
Access-Control-Max-Age: 1728000
示例
var request = new XMLHttpRequest();
var url = 'http://example.s3.amazonaws.com/templates/welcome.html';
function callOtherDomain(){
request.open('GET', url, true);
request.withCredentials = "true";
request.onreadystatechange = handler;
request.send();
}
最佳答案
关于javascript - Amazon S3 和跨源资源共享 (CORS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4717006/