@@ -2413,6 +2413,8 @@ var directives = map[string][]uint{
24132413
24142414// nginx app protect specific and global directives
24152415// [https://docs.nginx.com/nginx-app-protect/configuration-guide/configuration/#directives]
2416+ //
2417+ //nolint:gochecknoglobals
24162418var appProtectWAFv4Directives = map [string ][]uint {
24172419 "app_protect_compressed_requests_action" : {
24182420 ngxHTTPMainConf | ngxConfTake1 ,
@@ -2454,11 +2456,12 @@ var appProtectWAFv4Directives = map[string][]uint{
24542456
24552457// MatchAppProtectWAFv4 is a match function for parsing an NGINX config that contains the
24562458// App Protect v4 module.
2457- func MatchAppProtectWAFv4 (directive string ) (masks []uint , matched bool ) {
2458- masks , matched = appProtectWAFv4Directives [directive ]
2459- return
2459+ func MatchAppProtectWAFv4 (directive string ) ([]uint , bool ) {
2460+ masks , matched : = appProtectWAFv4Directives [directive ]
2461+ return masks , matched
24602462}
24612463
2464+ //nolint:gochecknoglobals
24622465var appProtectWAFv5Directives = map [string ][]uint {
24632466 // https://docs.nginx.com/nginx-app-protect-waf/v5/configuration-guide/configuration/#global-directives
24642467 "app_protect_physical_memory_util_thresholds" : {
@@ -2502,7 +2505,7 @@ var appProtectWAFv5Directives = map[string][]uint{
25022505
25032506// MatchAppProtectWAFv5 is a match function for parsing an NGINX config that contains the
25042507// App Protect v5 module.
2505- func MatchAppProtectWAFv5 (directive string ) (masks []uint , matched bool ) {
2506- masks , matched = appProtectWAFv5Directives [directive ]
2507- return
2508+ func MatchAppProtectWAFv5 (directive string ) ([]uint , bool ) {
2509+ masks , matched : = appProtectWAFv5Directives [directive ]
2510+ return masks , matched
25082511}
0 commit comments