Skip to content

Commit 4249cef

Browse files
committed
adding config flag to enable
Signed-off-by: James Strong <[email protected]>
1 parent ddc24f8 commit 4249cef

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

images/nginx-1.25/rootfs/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ get_src()
127127

128128
echo "Downloading $url"
129129

130-
curl -sSL "$url" -o "$f"
130+
curl --retry 5 -sSL "$url" -o "$f"
131131
# TODO: Reenable checksum verification but make it smarter
132132
# echo "$hash $f" | sha256sum -c - || exit 10
133133
if [ ! -z "$dest" ]; then
@@ -498,7 +498,7 @@ WITH_MODULES=" \
498498
--add-dynamic-module=$BUILD_PATH/ModSecurity-nginx \
499499
--add-dynamic-module=$BUILD_PATH/ngx_http_geoip2_module \
500500
--add-dynamic-module=$BUILD_PATH/ngx_brotli \
501-
--add-module=$BUILD_PATH/njs"
501+
--add-module=$BUILD_PATH/njs/nginx"
502502

503503
./configure \
504504
--prefix=/usr/local/nginx \

internal/ingress/controller/config/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,9 @@ type Configuration struct {
452452
// MIME Types that will be compressed on-the-fly using Brotli module
453453
BrotliTypes string `json:"brotli-types,omitempty"`
454454

455+
//Enables NGINX JS
456+
EnableNJS bool `json:"enable-njs,omitempty`
457+
455458
// Enables or disables the HTTP/2 support in secure connections
456459
// http://nginx.org/en/docs/http/ngx_http_v2_module.html
457460
// Default: true
@@ -790,6 +793,7 @@ func NewDefault() Configuration {
790793
BrotliLevel: 4,
791794
BrotliMinLength: 20,
792795
BrotliTypes: brotliTypes,
796+
EnableNJS: false,
793797
ClientHeaderBufferSize: "1k",
794798
ClientHeaderTimeout: 60,
795799
ClientBodyBufferSize: "8k",

pkg/flags/flags.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ Takes the form "<host>:port". If not provided, no admission controller is starte
228228
disableSyncEvents = flags.Bool("disable-sync-events", false, "Disables the creation of 'Sync' event resources")
229229

230230
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.")
231+
232+
231233
)
232234

233235
flags.StringVar(&nginx.MaxmindMirror, "maxmind-mirror", "", `Maxmind mirror url (example: http://geoip.local/databases.`)

0 commit comments

Comments
 (0)