
入口已配置跨域运行
header("Access-Control-Allow-Origin:*");
header("Access-Control-Allow-Methods:GET,POST,PUT,OPTIONS,DELETE");
header("Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept");OPTIONS请求返回成功但没有继续前端提示跨域错误
Access to XMLHttpRequest at 'http://127.0.0.1:84/service/ordergoods/operate/tp/confirm' from origin 'http://localhost:1234' has been blocked by CORS policy: Request header field unit is not allowed by Access-Control-Allow-Headers in preflight response. 最佳答案