@@ -2413,6 +2413,8 @@ var directives = map[string][]uint{
2413
2413
2414
2414
// nginx app protect specific and global directives
2415
2415
// [https://docs.nginx.com/nginx-app-protect/configuration-guide/configuration/#directives]
2416
+ //
2417
+ //nolint:gochecknoglobals
2416
2418
var appProtectWAFv4Directives = map [string ][]uint {
2417
2419
"app_protect_compressed_requests_action" : {
2418
2420
ngxHTTPMainConf | ngxConfTake1 ,
@@ -2454,11 +2456,12 @@ var appProtectWAFv4Directives = map[string][]uint{
2454
2456
2455
2457
// MatchAppProtectWAFv4 is a match function for parsing an NGINX config that contains the
2456
2458
// 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
2460
2462
}
2461
2463
2464
+ //nolint:gochecknoglobals
2462
2465
var appProtectWAFv5Directives = map [string ][]uint {
2463
2466
// https://docs.nginx.com/nginx-app-protect-waf/v5/configuration-guide/configuration/#global-directives
2464
2467
"app_protect_physical_memory_util_thresholds" : {
@@ -2502,7 +2505,7 @@ var appProtectWAFv5Directives = map[string][]uint{
2502
2505
2503
2506
// MatchAppProtectWAFv5 is a match function for parsing an NGINX config that contains the
2504
2507
// 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
2508
2511
}
0 commit comments