From 1292d189cf15dd7ea904d5f76dc9630514f175c4 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 13 Jan 2025 10:11:20 +0100 Subject: feat(webui): implement logout process --- pkg/webui/routes.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/webui/routes.go') diff --git a/pkg/webui/routes.go b/pkg/webui/routes.go index 5cf31c0..6ebe90b 100644 --- a/pkg/webui/routes.go +++ b/pkg/webui/routes.go @@ -15,6 +15,7 @@ func addRoutes( mux.Handle("GET /healthz", handleHealthz()) mux.Handle("GET /login", session(handleLoginGET())) mux.Handle("POST /login", session(handleLoginPOST(db))) + mux.Handle("GET /logout", session(requireLogin(handleLogoutGET(db)))) mux.Handle("GET /static/", cache(http.FileServer(http.FS(staticFS)))) mux.Handle("GET /", session(requireLogin(handleIndexGET()))) } -- cgit v1.2.3