Skip to content

Commit 31b7074

Browse files
committed
Add NJS module to Nginx
1 parent 2088e37 commit 31b7074

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

images/nginx/rootfs/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ export OPENTELEMETRY_CPP_VERSION="v1.11.0"
106106
# Check on https://github.com/open-telemetry/opentelemetry-proto
107107
export OPENTELEMETRY_PROTO_VERSION="v1.1.0"
108108

109+
# Check for recent changes: https://github.com/nginx/njs/compare/0.8.7...master
110+
export NJS_VERSION="0.8.7"
111+
109112
export BUILD_PATH=/tmp/build
110113

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

420+
# checkout njs module
421+
cd "$BUILD_PATH"
422+
git clone -n https://github.com/nginx/njs
423+
cd njs/
424+
git checkout $NJS_VERSION
425+
417426
# build nginx
418427
cd "$BUILD_PATH/nginx-$NGINX_VERSION"
419428

@@ -478,6 +487,7 @@ WITH_MODULES=" \
478487
--add-module=$BUILD_PATH/lua-nginx-module \
479488
--add-module=$BUILD_PATH/stream-lua-nginx-module \
480489
--add-module=$BUILD_PATH/lua-upstream-nginx-module \
490+
--add-module=$BUILD_PATH/njs/nginx \
481491
--add-dynamic-module=$BUILD_PATH/nginx-http-auth-digest \
482492
--add-dynamic-module=$BUILD_PATH/ModSecurity-nginx \
483493
--add-dynamic-module=$BUILD_PATH/ngx_http_geoip2_module \

0 commit comments

Comments
 (0)