feat: log file downloads

This commit is contained in:
OpenClaw Agent
2026-09-21 16:06:15 +08:00
parent 7ca454aba5
commit 62872220f9
+1
View File
@@ -487,6 +487,7 @@ func (s *Server) serveFile(w http.ResponseWriter, r *http.Request, p string, att
if attachment { if attachment {
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%q", fi.Name())) w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%q", fi.Name()))
} }
s.logOp(r, fmt.Sprintf("download '%s'", p))
http.ServeContent(w, r, fi.Name(), fi.ModTime(), f) http.ServeContent(w, r, fi.Name(), fi.ModTime(), f)
} }