저는 AngularJS를 기반으로 테스트 사이트를 운영 중이며 Forge OAuth를 얻는 데 문제가 있습니다. 여기 그것은 밖으로 erroring의 I 만들기 위해 노력하고있어 요청 ...AngularJS를 사용하는 Autodesk Forge OAuth : No 'Access-Control-Allow-Origin'헤더가 있습니다.
$http({
method: 'POST',
url: 'https://developer.api.autodesk.com/authentication/v1/authenticate',
data: 'client_id=' + token.clientId + '&client_secret=' + token.secret + '&grant_type:client_credentials&scope=data:read',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
withCredentials: false
}).then(function (r) {
authToken = r.access_token;
toastr.success('success');
}, function (e) {
toastr.error('fail');
});
는 다음과 같습니다
XMLHttpRequest cannot load https://developer.api.autodesk.com/authentication/v1/authenticate. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 500.
나는 이것이 내가 대한 전문가가 아니라 해요 CORS 관련 문제, 알고있다. $ http.post()를 사용하여이 작업을 수행 할 수 있습니까? 그렇지 않은 경우 Angular를 사용하여 인증하려면 어떻게해야합니까?