Opened 5 years ago
Closed 5 years ago
#1961 closed enhancement (duplicate)
Extend gzip_static module to handle more accept-encodings
Reported by: | Дилян Палаузов | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | nginx-module | Version: | |
Keywords: | gzip_static | Cc: | Дилян Палаузов |
uname -a: | |||
nginx -V: | 1.16.1 |
Description
As new Accept-Encodings are added, notably br and zstd, please extend the gzip_static directive to accept more values:
“on” - return .gz on Accept-Encoding: gzip
“on br” - return .br files on Accept-Encoding: br or Accept-Encoding br, gzip or Accept-Enoding: gzip, br; return .gz files on Accept-Encoding: gzip
"br" - return .br files on Accept-Encoding: br
Currently ngx_brotli can do the latter option with “brotli_static", but it is tedious task to configure both gzip_static an brotli_static at all places.
Moreover, zstd comes as next Accept-Encoding and for browsers accepting all of zstd, gz and br, the server shall deliver the smallest file, if all three static-variansts are available. This shall be done in a single module. See also https://github.com/google/ngx_brotli/issues/101 .
This Trac does not know yet of version 1.18.x.
Fixed, thanks.
Duplicate of #798.