I run Firefox 105.0.1 and use jquery-3.6.1-min und want to post data to a Python Flask app listening on port 5555.
I can do that with chrome, edge and opera, but firefox gives me an error.
Here is my code:
var settings = {
"url": "http://10.10.0.55:5555/test",
"method": "POST",
"timeout": 2000,
"crossDomain": true,
"headers": {
"Content-Type": "application/json",
"Authorization": authdata
},
"data": JSON.stringify({
"data": "mydata",
}),
};
$.ajax(settings)
.done(function() {
alert( "success" );
})
.fail(function() {
alert( "error" );
})
.always(function() {
alert( "complete" );
});
Is there a way to overcome this error in firefox?