안녕하세요, OAuth 2.0을 통해 사용자를 인증하는 중이고 Access Control-Allow-Origin 오류가 발생합니다 (XMLHttpRequest cannot load https://www.box.com/api/oauth2/token. Origin http://localhost is not allowed by Access-Control-Allow-Origin.
). POST 요청 후 :HTTP 요청을 할 때 Access Control-Allow-Origin 오류가 발생했습니다.
var xhr=new XMLHttpRequest();
xhr.open('POST',path,true);
xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xhr.onload = function() {
var text = xhr.responseText;
alert('Response from request to ' + path + ': ' + text);
};
xhr.onerror = function() {
alert('Woops, there was an error making the request.');
};
xhr.send(params);
어떤 도움을 주시면 감사하겠습니다! CORS, JSONP 및 콜백 추가에 대해 살펴 보았습니다. =? url에 시도했지만 아무것도 시도하지 않았습니다.
아아아, 지적 해 주셔서 감사합니다. – user2066880