The ngx_unbrotli
module is a filter that decompresses responses with Content-Encoding: br
for clients that do not support brotli
encoding method.
./build_brotli.sh
cd path/to/nginx-src
./configure --add-dynamic-module=path/to/ngx_unbrotli
make modules
cp objs/ngx_http_unbrotli_filter_module.so path/to/nginx/modules
load_module modules/ngx_http_unbrotli_filter_module.so;
Usage is similar to ngx_http_gunzip_module
- Replace
gunzip
withunbrotli
- Replace
gunzip_buffers
withunbrotli_buffers