logout button

This commit is contained in:
bronku 2025-04-05 11:39:15 +02:00
parent 028c023f80
commit 022619246e
5 changed files with 32 additions and 1 deletions

View file

@ -43,6 +43,7 @@ func (a *Authenticator) Middleware(in http.Handler) http.Handler {
handler := http.NewServeMux()
handler.HandleFunc("GET /login", getLogin)
handler.HandleFunc("POST /login", a.login)
handler.HandleFunc("GET /logout", a.logout)
handler.Handle("/", a.ensureAuth(in))
return handler
}