当前位置: 动力学知识库 > 问答 > 编程问答 >

node.js - Clear HTTPOnly www.site.com cookie from .site.com Express

问题描述:

I've recently updated my cookies to use .site.com as the domain instead of www.site.com.

I have older users out there with a www.site.com cookie.

Both have HTTPOnly set so I can't just run some JS to remove them.

I've tried the following but it's not getting the www.site.com cookie

for(var c in req.cookies){

res.clearCookie(c, req.cookies[c])

}

Any idea on how to clear the www.site.com cookie would be great!

网友答案:

This is probably ugly way, but you could try and put a hidden iframe which points to www.site.com/delwwwcookie or something and check if you get the cookie in that route's request.

分享给朋友:
您可能感兴趣的文章:
随机阅读: