前端请求时在 request 对象中配置 "withCredentials": true
axios({
withCredentials: true,
})
服务端 response.header 配置
header: {
"Access-Control-Allow-Origin", "http://xxx:${port}",
"Access-Control-Allow-Credentials", "true"
}
前端请求时在 request 对象中配置 "withCredentials": true
axios({
withCredentials: true,
})
服务端 response.header 配置
header: {
"Access-Control-Allow-Origin", "http://xxx:${port}",
"Access-Control-Allow-Credentials", "true"
}