.net core删除cookie
电脑版发表于:2020/3/21 18:08
code:
CookieOptions cookieOptions = new CookieOptions(); cookieOptions.Domain = ".tnblog.net"; //设置domain让cookie共享 //删除登录信息 HttpContext.Response.Cookies.Delete("token", cookieOptions);
注意删除的时候domain的设置