admin: don't log normal 2xx/3xx HTTP requests (incl. 304 cache hits)

This commit is contained in:
Chris Lu
2026-06-17 11:34:38 -07:00
parent 65484cb4bb
commit 0c343e76eb
+2 -1
View File
@@ -565,7 +565,8 @@ func loggingMiddleware(next http.Handler) http.Handler {
if status == 0 {
status = http.StatusOK
}
if status >= 200 && status < 300 {
// Only log errors; 2xx/3xx (including 304 Not Modified cache hits) are normal.
if status < 400 {
return
}