Konstantin Demin
6b13a28e52
index.txt was too short to trigger compression, so it was padded to be at least 2 KiB. |
||
---|---|---|
.. | ||
j2cfg | ||
site | ||
static | ||
docker-compose.yml | ||
Dockerfile | ||
README.md |
container configuration override
consult Dockerfile or docker-compose.yml - both are simple and fine enough.
mostly same as simple static site except container configuration file j2cfg/override-compress-types.yml
.
j2cfg/override-compress-types.yml
:
compress_types: []
---
compress_types:
- text/plain
this effectively disables response compression for all mime types except text/plain
.
in order to enable (!) response compression specify environment variable NGX_HTTP_CONFLOAD='gzip'
or NGX_HTTP_MODULES='gzip brotli zstd'
(for gzip, brotli and zstd).
Test URI e.g. with curl
:
curl -v --compressed http://127.0.0.1:8080/index.html
curl -v --compressed http://127.0.0.1:8080/index.txt