nytimes / gziphandler

Go middleware to gzip HTTP responses
https://godoc.org/github.com/NYTimes/gziphandler
Apache License 2.0
868 stars 129 forks source link

Adds ContentTypeException function. #98

Closed mkraft closed 3 years ago

mkraft commented 4 years ago

Adds a ContentTypeExceptions function to support excluding/blacklisting a set of content-types.

An example use case is wanting to use Brotli content-encoding for a set of content-types and continue using gzip for all other content-types, without having to that universal set.

The ContentTypes and ContentTypeExceptions configuration options are mutually exclusive so GzipHandlerWithOpts returns an error if both options are provided.

mkraft commented 3 years ago

Closing this as we're coming up on a year with no response.