Access to XMLHttpRequest at 'xxx' from origin 'http://localhost:8082' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
1、后端已经解决了跨域问题
2、有些请求不会出现问题,单独一两个请求
解决方法:
出现问题的请求
get_part(){
this.$axios({
url: this.$settings.base_url + '/user/partforposition',
method: 'get',
headers: { 'AUTHORIZATION': sessionStorage.getItem(this.$settings.base_token) }
}).
在请求url改成: url: this.$settings.base_url + '/user/partforposition/',
这是我遇到这个报错出现的问题,可能url没有错误也会报这个错,这个看系统版本和配置了。