Skip to content

rushiiMachine/caddy-deflate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

caddy-deflate

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)

Building with xcaddy

xcaddy build \
  --with github.com/rushiiMachine/caddy-deflate

Samples

The 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
}

About

A caddy plugin that adds a deflate compression encoder for caddy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages