Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hanadalee/ngx_http_unbrotli_filter_module

A nginx filter module that decompresses responses with Content-Encoding: br for clients that do not support brotli encoding method
https://github.com/hanadalee/ngx_http_unbrotli_filter_module

brotli brotli-decompressor nginx nginx-module

Last synced: 14 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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

* [Name](#name)
* [Status](#status)
* [Synopsis](#synopsis)
* [Installation](#installation)
* [Directives](#directives)
* [unbrotli](#unbrotli)
* [unbrotli_force](#unbrotli_force)
* [unbrotli_buffers](#unbrotli_buffers)
* [Author](#author)
* [License](#license)

# Status

This Nginx module is currently considered experimental.

# Synopsis

```nginx
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](https://github.com/clyfish)

This module is forked from [ngx_unbrotli](https://github.com/clyfish/ngx_unbrotli)