Update modules/httplib/serve.go

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
wxiaoguang 2024-05-02 08:35:47 +08:00 committed by GitHub
parent 2b011e71c7
commit fbed6e2ae2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ type ServeHeaderOptions struct {
func ServeSetHeaders(w http.ResponseWriter, opts *ServeHeaderOptions) {
header := w.Header()
skipCompressionExts := container.SetOf(".gz", ".bz2", ".zip", ".xz", ".zst", ".deb", ".apk", ".jar", ".png", ".jpg")
skipCompressionExts := container.SetOf(".gz", ".bz2", ".zip", ".xz", ".zst", ".deb", ".apk", ".jar", ".png", ".jpg", ".webp")
if skipCompressionExts.Contains(path.Ext(opts.Filename)) {
w.Header().Add(gzhttp.HeaderNoCompression, "1")
}