I have part AJAX code, but it returns statustext "NS_ERROR_DOM_BAD_URI: Access to restricted URI denied"
Some parts in $.ajax
I had added, but nothing changed
From this url I become just a number, without html
or xml tags
$.ajax({
url: route, //here is my link, when open in browser all is ok
type: 'GET',
dataType: '_default', //was text
username: username,
password: password ,
crossDomain:true, //added
xhrFields: { withCredentials: true }, //added
success: function(data1) {
console.log(data1);
alert(data1);
},
error: function(err){console.log(err);
alert(err);}
,beforeSend: function (xhr) {
xhr.setRequestHeader("Access-Control-Allow-Origin", "*"); //added
},
headers: {
'Access-Control-Allow-Origin': '*'} //added
})
I have tested it in Firefox