https://github.com/ant-design/ant-design-pro/issues/5846
设置mode: ‘no-cors’ 再设置
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
不会生效。
要么让后端加上cors,要么前端通过代理方式访问,如果要改Content-Type, 就不能加mode: ‘no-cors’
【umi-reques】umi-request 配置request后,无法覆盖默认设置的 Content-Type:text/plain
阅读 111
2023-12-08
https://github.com/ant-design/ant-design-pro/issues/5846
设置mode: ‘no-cors’ 再设置
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
不会生效。
要么让后端加上cors,要么前端通过代理方式访问,如果要改Content-Type, 就不能加mode: ‘no-cors’
相关推荐
精彩评论(0)