initial commit
This commit is contained in:
32
doc/examples/j2cfg-override/README.md
Normal file
32
doc/examples/j2cfg-override/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# container configuration override
|
||||
|
||||
consult [Dockerfile](Dockerfile) or [docker-compose.yml](docker-compose.yml) - both are simple and fine enough.
|
||||
|
||||
---
|
||||
|
||||
mostly same as [simple static site](../basic/README.md) except container configuration file `j2cfg/override-compress-types.yml`.
|
||||
|
||||
`j2cfg/override-compress-types.yml`:
|
||||
```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`:
|
||||
```sh
|
||||
curl -v --compressed http://127.0.0.1:8080/index.html
|
||||
|
||||
curl -v --compressed http://127.0.0.1:8080/index.txt
|
||||
```
|
Reference in New Issue
Block a user