withCredentials:默认情况下,跨源请求不提供凭据(cookie、HTTP认证及客户端SSL证明等)。前端通过将withCredentials属性设置为true指定某个请求应该发送凭据
withCredentials默认 false
如果全局设置为true会触发鉴权,导致鉴权未通过的跨域问题
如果局部想关闭鉴权可在业务局部设置 withCredentials为false
axios({
url: signedUrl,
data: file,
method: 'put',
withCredentials: false
}).then(res => {
})