Tuesday, July 23, 2019

jquery - JavaScript Error : Cross-Origin Read Blocking (CORB) blocked cross-origin response

Using API to fetch data in JavaScript, but its giving this error



Cross-Origin Read Blocking (CORB) blocked cross-origin response https://MYURL/admin/orders.json?callback=jQuery33108579100223062108_1529487937348&_=1529487937349 with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.



here is my code



var settings = {
"async": true,
"crossDomain": true,

"dataType": "JSONP",
"url": "myurl",
"method": "GET",
"headers": {
"Access-Control-Allow-Credentials": true,
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET",
"Access-Control-Allow-Headers": "Content-Type",
"authorization": "Basic ZGNlMzFjMzNkMDJlY2RiZjsdfdsfIxNjc6YzNhYzssdfsdfdfsdfMTU1ZDk4ZGM=",
}

}
$.ajax(settings).done(function (response) {
console.log(response);
});


NOTE: IN PHP CURL request all things are working fine.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...