Hello I'm currently working on a script that must extract information from a third party feed which returns a json file. I am not able to use CORS since I do not have server access, so based on desk research I was informed to use JSONP. I am able to see the callback (response) in chrome network's tab but I can't read the file in the chrome log. The point is that when I execute the following code I get the Error Message below. I can't turn off mime type checking. I've tried to have a look on other questions but couldn't find anything similar. What should be done?
"Refused to execute script from 'https://siteurl.com/json=jsonp&callback=jQuery321030035432758818903_1501098778362&_=1501098778363' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled. "
<script src="jquery.js"></script>
<script>
$.ajax({
type: 'GET',
url: 'siteurl.com/json?callback=jsonp',
dataType: 'jsonp',
xhrFields: {
withCredentials: false
},
headers: {
"Accept" : "application/json; charset=utf-8",
"Content-Type": "application/javascript; charset=utf-8",
"Access-Control-Allow-Origin" : "*"
},
success: function (result) {
console.log(result);
},
error: function (xhr, errorText) {
console.log('Error ' + xhr.responseText);
}
});
</script>
Take a look at the network tab: