summaryrefslogtreecommitdiff
path: root/pkg/webui/routes.go
diff options
context:
space:
mode:
authorJulien Dessaux2025-01-13 10:11:20 +0100
committerJulien Dessaux2025-01-13 10:11:20 +0100
commit1292d189cf15dd7ea904d5f76dc9630514f175c4 (patch)
tree6aab0161136c1d53ba8d0ffe931d9810b1b9c419 /pkg/webui/routes.go
parentfeat(tfstated): store created and updated timestamps for states (diff)
downloadtfstated-1292d189cf15dd7ea904d5f76dc9630514f175c4.tar.gz
tfstated-1292d189cf15dd7ea904d5f76dc9630514f175c4.tar.bz2
tfstated-1292d189cf15dd7ea904d5f76dc9630514f175c4.zip
feat(webui): implement logout process
Diffstat (limited to '')
-rw-r--r--pkg/webui/routes.go1
1 files changed, 1 insertions, 0 deletions
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())))
}