vue axios.defaults.withCredentials = true

1.vue axios.defaults.withCredentials = true

Vue和django的前后端分离项目,之前通过在django中允许跨域访问实现了跨域请求,但为了使每个请求带上session信息,我设置了withCredentials ,即:

posted @ 2022-06-15 18:08  BBS_自律  阅读(160)  评论(0)    收藏  举报