Remove too many debug messages

This commit is contained in:
2024-12-19 22:00:42 +01:00
parent 0aa67f5cc2
commit b065938211
26 changed files with 75 additions and 586 deletions

View File

@@ -51,9 +51,6 @@ func (h *StaticHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// Set cache headers for assets
if strings.HasPrefix(requestedPath, "/assets/") {
w.Header().Set("Cache-Control", "public, max-age=31536000") // 1 year
log.Debug("cache headers set for asset",
"path", requestedPath,
)
}
// Check if file exists (not counting .gz files)
@@ -97,22 +94,11 @@ func (h *StaticHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
contentType = "text/html"
}
w.Header().Set("Content-Type", contentType)
log.Debug("serving gzipped file",
"path", requestedPath,
"gzPath", gzPath,
"contentType", contentType,
)
http.ServeFile(w, r, gzPath)
return
}
}
// Serve original file
log.Debug("serving original file",
"path", requestedPath,
"size", stat.Size(),
"modTime", stat.ModTime(),
)
http.ServeFile(w, r, cleanPath)
}