HTTP篇之cookie设置
前台代码:var xhr = new XMLHttpRequest();xhr.open('GET','http://localhost:3000/list');xhr.withCredentials = true;xhr.send();XMLHttpRequest发送请求时需要设置withCredentials属性为true,来允许浏览器在自己的域设置cookie值。如果withCredentials没有设置为true,就会出现Response Headers有Set-Cookie,但