docs(br): Caddy v2 doesn't server pre-compressed files automatically

This commit is contained in:
MDLeom 2020-11-12 02:02:07 +00:00
parent ea29aa0ad5
commit 140a005dc7
1 changed files with 1 additions and 1 deletions

View File

@ -288,7 +288,7 @@ If you have access to the web server config, you should disable on-the-fly compr
- [nginx](https://github.com/google/ngx_brotli): Make sure both filter and static modules are enabled. This way pre-compressed `.br` files will be served while dynamic content can be compressed on-the-fly. Protip: `brotli_types text/plain text/css application/javascript application/json image/svg+xml application/xml+rss;` to prevent compressing media files (which are already compressed anyway).
- [Apache](https://httpd.apache.org/docs/2.4/en/mod/mod_brotli.html): See 'Serving pre-compressed content' section of [mod_brotli](https://httpd.apache.org/docs/2.4/en/mod/mod_brotli.html).
- [Caddy](https://caddyserver.com/features): [0.9.4+](https://caddyserver.com/blog/caddy-0_9_4-released) by default support pre-compressed `.gz` `.br` files and on-the-fly gzip compress dynamic files.
- [Caddy](https://caddyserver.com/features): [0.9.4+](https://caddyserver.com/blog/caddy-0_9_4-released) by default support pre-compressed `.gz` `.br` files and on-the-fly gzip compress dynamic files. v2 requires manual configuration to server pre-compressed [gzip](https://caddy.community/t/how-to-serve-gzipped-files-automatically-in-caddy-v2/7311) and [brotli](https://caddy.community/t/why-caddy-2-is-not-able-to-serve-static-brotli-files/7653) files, serving them automatically to be supported [in future](https://github.com/caddyserver/caddy/issues/2665).
- [express](https://github.com/expressjs/express)/[connect](https://github.com/senchalabs/connect): Use [pre-compressed-assets](https://github.com/domadams/pre-compressed-assets). You still can continue to use [compression](https://github.com/expressjs/compression)/[shrink-ray-current](https://github.com/Alorel/shrink-ray) for dynamic files.
## Credits