fix: require Basic Auth for health checks

This commit is contained in:
ji ruo committed 2026-11-03 14:56:39 +08:00
1 parent 5203176364
commit f053931a1d
7 files changed
+76 -24

No files matched your search

+1 -1
View File
@@ -1150,7 +1150,7 @@ func (s *Server) Handler() http.Handler {
// --- handlers ---
// health stays public for probes and must not expose application fingerprints.
// health requires the optional Basic Auth gate but no admin JWT, and exposes no application fingerprints.
func (s *Server) health(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "no-store")
writeJSON(w, 200, map[string]any{"ok": true})