mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-07 05:11:51 +08:00
fix: require Basic Auth for health checks
This commit is contained in:
1 parent
5203176364
commit
f053931a1d
7 files changed
+76
-24
No files matched your search
+1
-1
@@ -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})
|
||||
|
||||
Reference in new issue
Block a user