Skip to content

Run zstd before brotli if both are enabled #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions filter/config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions static/config
Original file line number Diff line number Diff line change
Expand Up @@ -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