summaryrefslogtreecommitdiff
path: root/pkg/webui/index.go
diff options
context:
space:
mode:
authorJulien Dessaux2025-01-06 00:41:32 +0100
committerJulien Dessaux2025-01-06 00:41:32 +0100
commit6e069484cb0a911ba541e07bf04331fadbb76612 (patch)
tree3457c759d54ae91e5ac1e64fe0bbf9c4b8ac18f0 /pkg/webui/index.go
parentfeat(tfstated): add syscall.SIGTERM handling (diff)
downloadtfstated-6e069484cb0a911ba541e07bf04331fadbb76612.tar.gz
tfstated-6e069484cb0a911ba541e07bf04331fadbb76612.tar.bz2
tfstated-6e069484cb0a911ba541e07bf04331fadbb76612.zip
feat(webui): bootstrap session handling and login process
Diffstat (limited to '')
-rw-r--r--pkg/webui/index.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/webui/index.go b/pkg/webui/index.go
new file mode 100644
index 0000000..9c81729
--- /dev/null
+++ b/pkg/webui/index.go
@@ -0,0 +1,16 @@
+package webui
+
+import (
+ "html/template"
+ "net/http"
+)
+
+var indexTemplates = template.Must(template.ParseFS(htmlFS, "html/base.html", "html/index.html"))
+
+func handleIndexGET() http.Handler {
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Cache-Control", "no-store, no-cache")
+
+ render(w, indexTemplates, http.StatusOK, nil)
+ })
+}