diff --git a/filter/config b/filter/config index 2942125..3b4af9b 100644 --- a/filter/config +++ b/filter/config @@ -128,8 +128,9 @@ ngx_module_order="$ngx_module_name \ if [ "$ngx_module_link" != DYNAMIC ]; then # ngx_module_order doesn't work with static modules, # so we must re-order filters here. - - if [ "$HTTP_GZIP" = YES ]; then + if echo $HTTP_FILTER_MODULES | grep ngx_http_brotli_filter_module >/dev/null; then + next=ngx_http_brotli_filter_module + elif [ "$HTTP_GZIP" = YES ]; then next=ngx_http_gzip_filter_module elif echo $HTTP_FILTER_MODULES | grep pagespeed_etag_filter >/dev/null; then next=ngx_pagespeed_etag_filter diff --git a/static/config b/static/config index ed6e66e..505cab0 100644 --- a/static/config +++ b/static/config @@ -107,5 +107,7 @@ ngx_module_type=HTTP ngx_module_name=ngx_http_zstd_static_module ngx_module_incs="$ngx_zstd_opt_I" ngx_module_srcs=$HTTP_ZSTD_SRCS +ngx_module_order="ngx_http_brotli_static_module \ + $ngx_module_name" . auto/module