http-unbrotli #

ngx_http_unbrotli_filter_module is a filter that decompresses responses with “Content-Encoding: brotli” for clients that do not support “brotli” encoding method. The module will be useful when it is desirable to store data compressed to save space and reduce I/O costs.

Source: upstream source

Read more: deep-dive article on deb.myguard.nl

Directives

unbrotli #

syntax: unbrotli on | off;  ·  default: unbrotli off;  ·  context: http, server, location

Enables or disables decompression of brotli compressed responses for clients that lack brotli support.

unbrotli_buffers #

syntax: unbrotli_buffers number size;  ·  default: unbrotli_buffers 32 4k | 16 8k;  ·  context: http, server, location

Sets the number and size of buffers used to decompress a response. By default, the buffer size is equal to one memory page. This is either 4K or 8K, depending on a platform.

unbrotli_force #

syntax: unbrotli_force string ...;  ·  default: -  ·  context: http, server, location

Defines the conditions for forced brotli decompression. If at least one value in the string parameter is not empty and not equal to "0", forced brotli decompression is performed. But it will not try to decompress responses that do not contain the response header Content-Encoding: br

Example

server {
    listen 127.0.0.1:8080;
    server_name localhost;

    location / {
        # enable brotli decompression for clients that do not support brotli compression
        unbrotli on;

        proxy_pass http://foo.com;
    }
}

↑ back to index