{"id":15651905,"url":"https://github.com/dunglas/caddy-cbrotli","last_synced_at":"2025-10-24T08:50:52.206Z","repository":{"id":217790630,"uuid":"744552701","full_name":"dunglas/caddy-cbrotli","owner":"dunglas","description":"A Caddy module providing support for the Brotli compression format.","archived":false,"fork":false,"pushed_at":"2024-07-10T07:51:22.000Z","size":42,"stargazers_count":44,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T20:51:10.799Z","etag":null,"topics":["brotli","brotli-compression","brotli-encoder","caddy","caddy-module","caddy-plugin","go"],"latest_commit_sha":null,"homepage":"https://dunglas.dev","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dunglas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"dunglas"}},"created_at":"2024-01-17T14:34:39.000Z","updated_at":"2025-03-14T11:21:15.000Z","dependencies_parsed_at":"2024-10-23T02:49:52.645Z","dependency_job_id":null,"html_url":"https://github.com/dunglas/caddy-cbrotli","commit_stats":null,"previous_names":["dunglas/caddy-cbrotli"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunglas%2Fcaddy-cbrotli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunglas%2Fcaddy-cbrotli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunglas%2Fcaddy-cbrotli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunglas%2Fcaddy-cbrotli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dunglas","download_url":"https://codeload.github.com/dunglas/caddy-cbrotli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837287,"owners_count":21169374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brotli","brotli-compression","brotli-encoder","caddy","caddy-module","caddy-plugin","go"],"created_at":"2024-10-03T12:40:35.699Z","updated_at":"2025-10-24T08:50:47.170Z","avatar_url":"https://github.com/dunglas.png","language":"Go","funding_links":["https://github.com/sponsors/dunglas"],"categories":[],"sub_categories":[],"readme":"# Caddy Brotli Module\n\nThis module for [the Caddy web server](https://caddyserver.com) provides support for [the Brotli compression format](https://en.wikipedia.org/wiki/Brotli).\n\nIt uses [the reference implementation of Brotli](https://brotli.org/) (written in C), through [the Go module provided by Google](https://pkg.go.dev/github.com/google/brotli/go/cbrotli).\n\n[![Tests](https://github.com/dunglas/caddy-cbrotli/actions/workflows/tests.yaml/badge.svg)](https://github.com/dunglas/caddy-cbrotli/actions/workflows/tests.yaml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/dunglas/caddy-cbrotli.svg)](https://pkg.go.dev/github.com/dunglas/caddy-cbrotli)\n\n## Install\n\n1. Install [cbrotli](https://github.com/google/brotli/tree/master/c). On Mac run `brew install brotli`. On Debian and Ubuntu, run `apt install libbrotli-dev`.\n2. Then create your Caddy build:\n    ```console\n    CGO_ENABLED=1 \\\n    xcaddy build \\\n        --with github.com/dunglas/caddy-cbrotli\n    ```\n\n    On Mac, be sure to adapt the paths in `CGO_LDFLAGS` and `CGO_CFLAGS` according to your Brotli installation:\n\n    ```console\n    CGO_LDFLAGS=\"-L/opt/homebrew/lib/\" \\\n    CGO_CFLAGS=\"-I/opt/homebrew/include/\" \\\n    CGO_ENABLED=1 \\\n    xcaddy build \\\n        --with github.com/dunglas/caddy-cbrotli\n    ```\n\n## Usage\n\nAdd the `br` value to [the `encode` directive](https://caddyserver.com/docs/caddyfile/directives/encode) in your `Caddyfile`.\n\nExample:\n\n```caddyfile\nlocalhost\n\nencode zstd br gzip\n\nfile_server\n```\n\nAlternatively, you can configure the quality (from 0 to 11, defaults to 6) and the base 2 logarithm of the sliding window size (from 10 to 24, defaults to auto):\n\nExample:\n\n```caddyfile\nlocalhost\n\nencode {\n    br 8 15\n}\n\nfile_server\n```\n\n## Cgo\n\nThis module depends on [cgo](https://go.dev/blog/cgo).\nIf you are looking for a non-cgo (but more CPU-intensive) alternative, see [the `github.com/ueffel/caddy-brotli` module](https://github.com/ueffel/caddy-brotli).\n\n## Credits\n\nCreated by [Kévin Dunglas](https://dunglas.dev) and sponsored by [Les-Tilleuls.coop](https://les-tilleuls.coop).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunglas%2Fcaddy-cbrotli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdunglas%2Fcaddy-cbrotli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunglas%2Fcaddy-cbrotli/lists"}