diff options
Diffstat (limited to 'pkg/webui/index.go')
-rw-r--r-- | pkg/webui/index.go | 16 |
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) + }) +} |