From 6e069484cb0a911ba541e07bf04331fadbb76612 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 6 Jan 2025 00:41:32 +0100 Subject: feat(webui): bootstrap session handling and login process --- pkg/webui/index.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pkg/webui/index.go (limited to 'pkg/webui/index.go') 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) + }) +} -- cgit v1.2.3