diff --git a/images/nginx-1.25/rootfs/build.sh b/images/nginx-1.25/rootfs/build.sh index 2c34065c6..091dcd377 100755 --- a/images/nginx-1.25/rootfs/build.sh +++ b/images/nginx-1.25/rootfs/build.sh @@ -127,7 +127,7 @@ get_src() echo "Downloading $url" - curl -sSL "$url" -o "$f" + curl --retry 5 -sSL "$url" -o "$f" # TODO: Reenable checksum verification but make it smarter # echo "$hash $f" | sha256sum -c - || exit 10 if [ ! -z "$dest" ]; then @@ -498,7 +498,7 @@ WITH_MODULES=" \ --add-dynamic-module=$BUILD_PATH/ModSecurity-nginx \ --add-dynamic-module=$BUILD_PATH/ngx_http_geoip2_module \ --add-dynamic-module=$BUILD_PATH/ngx_brotli \ - --add-module=$BUILD_PATH/njs" + --add-module=$BUILD_PATH/njs/nginx" ./configure \ --prefix=/usr/local/nginx \ diff --git a/internal/ingress/controller/config/config.go b/internal/ingress/controller/config/config.go index 47f2120f1..383d92d9b 100644 --- a/internal/ingress/controller/config/config.go +++ b/internal/ingress/controller/config/config.go @@ -452,6 +452,9 @@ type Configuration struct { // MIME Types that will be compressed on-the-fly using Brotli module BrotliTypes string `json:"brotli-types,omitempty"` + //Enables NGINX JS + EnableNJS bool `json:"enable-njs,omitempty` + // Enables or disables the HTTP/2 support in secure connections // http://nginx.org/en/docs/http/ngx_http_v2_module.html // Default: true @@ -790,6 +793,7 @@ func NewDefault() Configuration { BrotliLevel: 4, BrotliMinLength: 20, BrotliTypes: brotliTypes, + EnableNJS: false, ClientHeaderBufferSize: "1k", ClientHeaderTimeout: 60, ClientBodyBufferSize: "8k", diff --git a/pkg/flags/flags.go b/pkg/flags/flags.go index 5891f636b..e878d654f 100644 --- a/pkg/flags/flags.go +++ b/pkg/flags/flags.go @@ -228,6 +228,8 @@ Takes the form ":port". If not provided, no admission controller is starte disableSyncEvents = flags.Bool("disable-sync-events", false, "Disables the creation of 'Sync' event resources") enableTopologyAwareRouting = flags.Bool("enable-topology-aware-routing", false, "Enable topology aware routing feature, needs service object annotation service.kubernetes.io/topology-mode sets to auto.") + + ) flags.StringVar(&nginx.MaxmindMirror, "maxmind-mirror", "", `Maxmind mirror url (example: http://geoip.local/databases.`)