3
私のアプリケーションをJIRAに統合したいので、JIRAサーバにリクエストを送信するときにエラーが返されます。 'XMLHttpRequestはhttps:// **** *****/rest/api/2/project。プリフライト要求への応答がアクセス制御チェックを通過しない:要求されたリソースに「アクセス制御許可」がない。「クロスオリジンHTTPリクエストで許可されているJIRA APIの設定方法
これは、私はあなたが持っている問題は、次のURLから取り組むことができると思う私のコード
$http({
method: "GET",
url: "https://***********/rest/api/2/project",
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': 'https://duosoftware.atlassian.net',
'Access-Control-Allow-Methods': 'GET, POST, DELETE, PUT, OPTIONS',
'Access-Control-Allow-Headers':'X-Requested-With, Content-Type, X-Codingpedia,Authorization'
},
dataType: "jsonp",
}).then(function mySuccess(response) {
$scope.myWelcome = response.data;
console.log(response.data);
}, function myError(response) {
$scope.myWelcome = response.statusText;
console.log(response.statusText);
});
};