[英]CORS: Response to preflight request doesn't pass access control check: It does not have HTTP ok status. REACTJS, AXIOS
Excuse my writing, use a translator for this.请原谅我的写作,为此请使用翻译器。
I am trying to consume an api which in the headers only receives the access token, but I get this response in the console.我正在尝试使用一个 api,它在标头中只接收访问令牌,但我在控制台中得到了这个响应。 I am using Axios with React.我在 React 中使用 Axios。
Access to XMLHttpRequest at '<apiURL>' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
Here is an image of the error.这是错误的图像。
I already tried to send the header parameters, but nothing has worked so far.我已经尝试发送 header 参数,但到目前为止没有任何效果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.