bugfix: clear cameo cookie on logout, too

This commit is contained in:
Settel 2024-02-18 13:24:04 +01:00
parent 3a19c5b3f7
commit 2bcb322488

View File

@ -19,6 +19,11 @@ func (authMux *AuthMux) createCookie() *http.Cookie {
func (authMux *AuthMux) Logout(w http.ResponseWriter, r *http.Request) { func (authMux *AuthMux) Logout(w http.ResponseWriter, r *http.Request) {
http.SetCookie(w, authMux.createCookie()) http.SetCookie(w, authMux.createCookie())
cameoCookie := authMux.createCookie()
cameoCookie.Name = cameoCookie.Name + "-cameo"
http.SetCookie(w, cameoCookie)
w.Header().Add("Content-Type", "text/plain") w.Header().Add("Content-Type", "text/plain")
fmt.Fprintf(w, "ok") fmt.Fprintf(w, "ok")
} }