post请求(headers里有属性)报错:Request header field xxx is not allowed by Access-Control-Allow-Headers in preflight response

2023-05-25编程技术273880

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。

post请求(headers里有属性)报错:Request header field xxx is not allowed by Access-Control-Allow-Headers in preflight response的相关教程结束。

本文地址:https://www.ufcn.cn/tutorials/2671569.html

如非特殊说明,本站内容均来自于网友自主分享,概不代表本站观点,如有任何问题我们都将在收到反馈后的第一时间进行处理!