app.post('/views/login.html’,function(req,res,next){ res.setHeader('Set-Cookie’, “username=123; path=/; max-age=0”); console.log(req.headers); }); 这样到底哪错了? 可是貌似cookie删不掉啊 输出的结果是: { host: 'localhost:3000’, connection: 'keep-alive’, 'content-length’: '14’, accept: 'text/plain, /; q=0.01’, origin: 'http://localhost:3000’, 'x-requested-with’: 'XMLHttpRequest’, 'user-agent’: 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Ge cko) Chrome/35.0.1916.153 Safari/537.36’, 'content-type’: 'application/x-www-form-urlencoded; charset=UTF-8’, referer: 'http://localhost:3000/’, 'accept-encoding’: 'gzip,deflate,sdch’, 'accept-language’: 'zh-CN,zh;q=0.8’, cookie: ‘username=123; pwd=123’ }
作者
作者其它话题