Skip to content

Commit

Permalink
Include a path when clearing the cookie (crewjam#278)
Browse files Browse the repository at this point in the history
Some browsers will refuse to remove a cookie that doesn't include the path
  • Loading branch information
rkuris authored and seongwoohong committed Dec 18, 2020
1 parent 20d6884 commit 4647748
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions samlsp/session_cookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func (c CookieSessionProvider) DeleteSession(w http.ResponseWriter, r *http.Requ

cookie.Value = ""
cookie.Expires = time.Unix(1, 0) // past time as close to epoch as possible, but not zero time.Time{}
cookie.Path = "/"
http.SetCookie(w, cookie)
return nil
}
Expand Down

0 comments on commit 4647748

Please sign in to comment.