A caddy plugin that adds support for HTTP's Accept-Encoding: deflate for caddy.
Note: This follows the official definition for http deflate, that being a deflate stream wrapped with zlib, not a
raw deflate stream! (many implementations have made this mistake)
xcaddy build \
--with github.com/rushiiMachine/caddy-deflateThe encode directive will have a new format
named deflate.
Valid compression levels are listed
here
otherwise any value in the range [0-9].
:80 {
encode deflate
file_server
}or
:80 {
# Use multiple compressors
encode deflate gzip zstd
file_server
}or
:80 {
encode {
# Configure the compression level
deflate 4
# Configure another backup compressor
gzip
}
file_server
}