secure webui: require token auth on /webui page

This commit is contained in:
DBT
2026-02-25 11:59:43 +00:00
parent 175a96fb2b
commit 969dc1abb1

View File

@@ -120,6 +120,10 @@ func (s *RegistryServer) handleWebUI(w http.ResponseWriter, r *http.Request) {
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
return
}
if !s.checkAuth(r) {
http.Error(w, "unauthorized", http.StatusUnauthorized)
return
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")
_, _ = w.Write([]byte(webUIHTML))
}