Fix session destroy not clearing cookie #6

Merged
wolfogre merged 1 commits from zig1000/session:fix-session-destroy into master 2023-06-13 03:59:29 +00:00

View File

@ -448,8 +448,11 @@ func (m *Manager) Destroy(resp http.ResponseWriter, req *http.Request) error {
}
cookie := &http.Cookie{
Name: m.opt.CookieName,
Domain: m.opt.Domain,
Path: m.opt.CookiePath,
HttpOnly: true,
Secure: m.opt.Secure,
SameSite: m.opt.SameSite,
Expires: time.Now(),
MaxAge: -1,
}