diff --git a/gzhttp/compress.go b/gzhttp/compress.go index 452afb7f3b..3ec1e799ae 100644 --- a/gzhttp/compress.go +++ b/gzhttp/compress.go @@ -677,10 +677,11 @@ func parseCoding(s string) (coding string, qvalue float64, err error) { } // Don't compress any audio/video types. -var excludePrefixDefault = []string{"video/", "audio/"} +var excludePrefixDefault = []string{"video/", "audio/", "image/jp"} // Skip a bunch of compressed types that contains this string. -var excludeContainsDefault = []string{"compress", "zip"} +// Curated by supposedly still active formats on https://en.wikipedia.org/wiki/List_of_archive_formats +var excludeContainsDefault = []string{"compress", "zip", "snappy", "lzma", "xz", "zstd", "brotli", "stuffit"} // DefaultContentTypeFilter excludes common compressed audio, video and archive formats. func DefaultContentTypeFilter(ct string) bool {