Why does the problem of redirection occur when using ajax to request other websites
$.ajax({
url:"https://www.baidu.com",
type:"GET",
headers:{
"Access-Control-Allow-Origin":"*"
},
success:function(){
console.log(33);
},
error:function(){
console.log(344);
}
})
how to deal with this situation?