You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
预检请求, 请求头中方 token has been blocked by CORS policy: Request header field token is not allowed by Access-Control-Allow-Headers in preflight response.
#15
Open
wan-wing opened this issue
Jun 18, 2024
· 0 comments
https://blog.csdn.net/qq_41359758/article/details/115031701
由于在后端拦截器中拦截了所有的请求,只有检查到请求头中真实存在的token值才会放行请求,这就导致了浏览器发起的预检请求也被拦截了(由于该请求头中没有携带自定义的 Authorization 属性,所以被拦截),最终导致正式的 XMLHttpRequest 请求没有发出去。
https://blog.csdn.net/fuzhongbin/article/details/106239664
The text was updated successfully, but these errors were encountered: