Skip to content

Commit 6cf336e

Browse files
committed
Relax on NGINX_ENABLE_COMPRESSION_*
1 parent 3093e84 commit 6cf336e

2 files changed

Lines changed: 25 additions & 24 deletions

File tree

rootfs/container/functions/10-nginx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,31 @@ nginx_configure_server_authentication() {
3333
esac
3434
}
3535

36+
nginx_configure_server_compression_brotli() {
37+
update_template /etc/nginx/snippets/server.available/compression-brotli.conf \
38+
NGINX_COMPRESSION_BROTLI_LEVEL \
39+
NGINX_COMPRESSION_BROTLI_MIN_LENGTH \
40+
NGINX_COMPRESSION_BROTLI_TYPES \
41+
NGINX_COMPRESSION_BROTLI_WINDOW
42+
43+
nginx_snippet server ${NGINX_ENABLE_COMPRESSION_BROTLI} compression-brotli.conf
44+
}
45+
46+
nginx_configure_server_compression_gzip() {
47+
truefalse_onoff NGINX_COMPRESSION_GZIP_VARY lowercase
48+
update_template /etc/nginx/snippets/server.available/compression-gzip.conf \
49+
NGINX_COMPRESSION_GZIP_BUFFERS \
50+
NGINX_COMPRESSION_GZIP_DISABLE \
51+
NGINX_COMPRESSION_GZIP_HTTP_VERSION \
52+
NGINX_COMPRESSION_GZIP_LEVEL \
53+
NGINX_COMPRESSION_GZIP_MIN_LENGTH \
54+
NGINX_COMPRESSION_GZIP_PROXIED \
55+
NGINX_COMPRESSION_GZIP_TYPES \
56+
NGINX_COMPRESSION_GZIP_VARY
57+
58+
nginx_snippet server ${NGINX_ENABLE_COMPRESSION_GZIP} compression-gzip.conf
59+
}
60+
3661
nginx_configure_logging() {
3762
update_template /etc/nginx/snippets/server.available/logging.conf \
3863
NGINX_LOG_ACCESS_FILE \

rootfs/container/functions/10-nginx.advanced

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -225,30 +225,6 @@ nginx_configure_server_cache_open_file() {
225225
nginx_snippet server ${NGINX_ENABLE_CACHE_OPEN_FILE} cache-open_file.conf
226226
}
227227

228-
nginx_configure_server_compression_brotli() {
229-
update_template /etc/nginx/snippets/server.available/compression-brotli.conf \
230-
NGINX_COMPRESSION_BROTLI_LEVEL \
231-
NGINX_COMPRESSION_BROTLI_MIN_LENGTH \
232-
NGINX_COMPRESSION_BROTLI_TYPES \
233-
NGINX_COMPRESSION_BROTLI_WINDOW
234-
235-
nginx_snippet server ${NGINX_ENABLE_COMPRESSION_BROTLI} compression-brotli.conf
236-
}
237-
238-
nginx_configure_server_compression_gzip() {
239-
truefalse_onoff NGINX_COMPRESSION_GZIP_VARY lowercase
240-
update_template /etc/nginx/snippets/server.available/compression-gzip.conf \
241-
NGINX_COMPRESSION_GZIP_BUFFERS \
242-
NGINX_COMPRESSION_GZIP_DISABLE \
243-
NGINX_COMPRESSION_GZIP_HTTP_VERSION \
244-
NGINX_COMPRESSION_GZIP_LEVEL \
245-
NGINX_COMPRESSION_GZIP_MIN_LENGTH \
246-
NGINX_COMPRESSION_GZIP_PROXIED \
247-
NGINX_COMPRESSION_GZIP_TYPES \
248-
NGINX_COMPRESSION_GZIP_VARY
249-
250-
nginx_snippet server ${NGINX_ENABLE_COMPRESSION_GZIP} compression-gzip.conf
251-
}
252228

253229
nginx_configure_server_ddos_protection() {
254230
update_template /etc/nginx/snippets/server.available/limit-ddos_protection.conf \

0 commit comments

Comments
 (0)