Skip to content

A nginx filter module that decompresses responses with Content-Encoding: br for clients that do not support brotli encoding method

Notifications You must be signed in to change notification settings

HanadaLee/ngx_http_unbrotli_filter_module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Name

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.

Table of Content

Status

This Nginx module is currently considered experimental.

Synopsis

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

Installation

To use theses modules, configure your nginx branch with --add-module=/path/to/ngx_http_unbrotli_filter_module. Additionally, you need to pre-build the brotli decompression library.

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_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

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.

Author

clyfish

This module is forked from ngx_unbrotli

About

A nginx filter module that decompresses responses with Content-Encoding: br for clients that do not support brotli encoding method

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages