diff options
author | Kyle Unverferth <kyle@kyleu.com> | 2021-09-07 02:03:41 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-07 10:03:41 +0200 |
commit | 713da4e33f2b5af08241edc5712cf43d7e3b0e65 (patch) | |
tree | 685bf76def387ff829deae033f39c04c5003aab3 /header.go | |
parent | remove unnecessary op (#1095) (diff) | |
download | fasthttp-713da4e33f2b5af08241edc5712cf43d7e3b0e65.tar.gz fasthttp-713da4e33f2b5af08241edc5712cf43d7e3b0e65.tar.bz2 fasthttp-713da4e33f2b5af08241edc5712cf43d7e3b0e65.zip |
* Adding "image/svg" as compressible prefix
* Adding additional compressible prefixes from https://support.cloudflare.com/hc/en-us/articles/200168396-What-will-Cloudflare-compress-
Diffstat (limited to 'header.go')
-rw-r--r-- | header.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -271,7 +271,11 @@ func (h *RequestHeader) SetContentLength(contentLength int) { func (h *ResponseHeader) isCompressibleContentType() bool { contentType := h.ContentType() return bytes.HasPrefix(contentType, strTextSlash) || - bytes.HasPrefix(contentType, strApplicationSlash) + bytes.HasPrefix(contentType, strApplicationSlash) || + bytes.HasPrefix(contentType, strImageSVG) || + bytes.HasPrefix(contentType, strImageIcon) || + bytes.HasPrefix(contentType, strFontSlash) || + bytes.HasPrefix(contentType, strMultipartSlash) } // ContentType returns Content-Type header value. |