0
I added the instruction header('Access-Control-Allow-Origin: *');
in my php, but I keep seeing the error
jquery.min.js:2 Cross-Origin Read Blocking (CORB) blocked cross-origin sponse http://meusite.com with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more Details.
$("#formcontato").submit(function(event){
event.preventDefault(); //prevent default action
var post_url = $(this).attr("action"); //get form action url
var request_method = $(this).attr("method"); //get form GET/POST method
var form_data = new FormData(this); //Creates new FormData object
$.ajax({
url : post_url,
type: request_method,
data : form_data,
contentType: false,
cache: false,
processData:false
}).done(function(response){
console.log(response);
$("#server-results").html(response);
$("#formcontato")[0].reset();
});
});
I’ve been searching for 3 days and can’t solve it, it’s not lack of effort, I just can’t find content that really solves my problem.
CORB is different from CORS, add the javascript request code to the question so it can be analyzed as well, follow a debate on this item https://stackoverflow.com/questions/50873764/cross-origin-read-blocking-corb
– Rodolfo Patane
Thank you, javascript code added
– Felipe Cristiano