post请求(headers里有属性)报错:Request header field xxx is not allowed by Access-Control-Allow-Headers in preflight response
- post 请求,headers里有属性(xxx)。请求时报错:
XMLHttpRequest cannot load <url>. Request header field xxx is not allowed by Access-Control-Allow-Headers in preflight response.
解决:在后端的Access-Control-Allow-Headers
里,添加该 field。