Skip to content

Commit

Permalink
Add NJS module to Nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabeth-dev committed Nov 23, 2024
1 parent a5cd15d commit ceabf5b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions images/nginx/rootfs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ export OPENTELEMETRY_CPP_VERSION="v1.11.0"
# Check on https://github.com/open-telemetry/opentelemetry-proto
export OPENTELEMETRY_PROTO_VERSION="v1.1.0"

# Check for recent changes: https://github.com/nginx/njs/compare/0.8.7...master
export NJS_VERSION="0.8.7"

export BUILD_PATH=/tmp/build

ARCH=$(uname -m)
Expand Down Expand Up @@ -414,6 +417,12 @@ Include /etc/nginx/owasp-modsecurity-crs/rules/RESPONSE-980-CORRELATION.conf
Include /etc/nginx/owasp-modsecurity-crs/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
" > /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf

# checkout njs module
cd "$BUILD_PATH"
git clone -n https://github.com/nginx/njs
cd njs/
git checkout $NJS_VERSION

# build nginx
cd "$BUILD_PATH/nginx-$NGINX_VERSION"

Expand Down Expand Up @@ -478,6 +487,7 @@ WITH_MODULES=" \
--add-module=$BUILD_PATH/lua-nginx-module \
--add-module=$BUILD_PATH/stream-lua-nginx-module \
--add-module=$BUILD_PATH/lua-upstream-nginx-module \
--add-module=$BUILD_PATH/njs/nginx \
--add-dynamic-module=$BUILD_PATH/nginx-http-auth-digest \
--add-dynamic-module=$BUILD_PATH/ModSecurity-nginx \
--add-dynamic-module=$BUILD_PATH/ngx_http_geoip2_module \
Expand Down

0 comments on commit ceabf5b

Please sign in to comment.