一、问题二、修改
一、问题
在header
中加入自定义字段storeid
,前端调接口,报错提示:Request header field storeid is not allowed by Access-Control-Allow-Headers in preflight response.
大概意思是:在请求头中不允许使用字段storeid
二、修改
//允许在header中传参数:storeidheader("Access-Control-Allow-Headers: token, Origin, X-Requested-With, Content-Type, Accept, storeid");