diff --git a/main.go b/main.go index 9b7c937..0c6e874 100644 --- a/main.go +++ b/main.go @@ -164,6 +164,7 @@ func servePlaylist(cfg *Config, r *Refresher) http.HandlerFunc { http.Error(w, "stat", http.StatusInternalServerError) return } + slog.Info("serving playlist", "client", clientIP(req)) w.Header().Set("Content-Type", "application/vnd.apple.mpegurl") http.ServeContent(w, req, playlistFilename, fi.ModTime(), f) } @@ -188,7 +189,9 @@ func serveEPG(cfg *Config, r *Refresher) http.HandlerFunc { return } - if clientAcceptsGzip(req) { + gz := clientAcceptsGzip(req) + slog.Info("serving epg", "client", clientIP(req), "gzip", gz) + if gz { w.Header().Set("Content-Encoding", "gzip") w.Header().Set("Content-Type", cfg.EPGContentType) http.ServeContent(w, req, epgFilename, fi.ModTime(), f)