search

Home  >  Q&A  >  body text

node.js - 注销cookies

请问在node.js里面怎么注销cookies.
router.get('/',function(req,res){
req.cookies.destroy(function(err) {

res.redirect('/');
    })
 });

有问题吗?

PHP中文网PHP中文网2872 days ago763

reply all(1)I'll reply

  • 阿神

    阿神2017-04-17 16:39:09

    There is res.clearCookie() in express to clear cookies, but there is no destroy method you wrote

    reply
    0
  • Cancelreply