Ciao Ragazzi,
sto provando a caricare un JSON da un URL sotto https e quando lo richiamo ottengo il seguente errore
XMLHttpRequest cannot load https://[url]. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
Il codice con cui richiedo il JSON è il seguente:
codice:
$( document ).ready(function() {
CallService();
});
function CallService(){
$.ajax({
url: 'https://[url]',
type:"GET",
contentType: 'text/plain',
headers:[],
success:function(){
alert("ok");
},
error:function(){
alert("ko");
}
});
Ho solo possibilità di effettuare modifiche lato client e non so come fare.
Grazie