跨域请求OPTIONS前端报错

浏览:1310 发布日期:2019/11/03 分类:ThinkPHP5专区 关键字: 跨域

入口已配置跨域运行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.
最佳答案
评论( 相关
后面还有条评论,点击查看>>