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。

posted on 2018-01-05 14:15  cag2050  阅读(694)  评论(0编辑  收藏  举报

导航