adding config flag to enable

Signed-off-by: James Strong <strong.james.e@gmail.com>
This commit is contained in:
James Strong 2024-04-10 15:17:20 -04:00
parent ddc24f8070
commit 4249cefaea
3 changed files with 8 additions and 2 deletions

View file

@ -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 \

View file

@ -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",

View file

@ -228,6 +228,8 @@ Takes the form "<host>: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.`)