Skip to content

Commit 2472887

Browse files
committed
Capitalise WAF
1 parent db826b3 commit 2472887

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

internal/controller/nginx/config/base_http_config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ func TestExecuteBaseHttp_HTTP2(t *testing.T) {
6161
func TestExecuteBaseHttp_WAF(t *testing.T) {
6262
t.Parallel()
6363
confOn := dataplane.Configuration{
64-
WAF: dataplane.WafConfig{
64+
WAF: dataplane.WAFConfig{
6565
Enabled: true,
6666
},
6767
}
6868

6969
confOff := dataplane.Configuration{
70-
WAF: dataplane.WafConfig{
70+
WAF: dataplane.WAFConfig{
7171
Enabled: false,
7272
},
7373
}

internal/controller/nginx/config/main_config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ func TestExecuteMainConfig_Waf(t *testing.T) {
6060
t.Parallel()
6161

6262
wafOff := dataplane.Configuration{
63-
WAF: dataplane.WafConfig{
63+
WAF: dataplane.WAFConfig{
6464
Enabled: false,
6565
},
6666
}
6767
wafOn := dataplane.Configuration{
68-
WAF: dataplane.WafConfig{
68+
WAF: dataplane.WAFConfig{
6969
Enabled: true,
7070
},
7171
}

internal/controller/state/dataplane/configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func BuildConfiguration(
7979
NginxPlus: nginxPlus,
8080
MainSnippets: buildSnippetsForContext(g.SnippetsFilters, ngfAPIv1alpha1.NginxContextMain),
8181
AuxiliarySecrets: buildAuxiliarySecrets(g.PlusSecrets),
82-
WAF: WafConfig{Enabled: graph.WAFEnabledForNginxProxy(gateway.EffectiveNginxProxy)},
82+
WAF: WAFConfig{Enabled: graph.WAFEnabledForNginxProxy(gateway.EffectiveNginxProxy)},
8383
}
8484

8585
return config

internal/controller/state/dataplane/types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type Configuration struct {
5555
// BaseHTTPConfig holds the configuration options at the http context.
5656
BaseHTTPConfig BaseHTTPConfig
5757
// WAF holds the WAF configuration.
58-
WAF WafConfig
58+
WAF WAFConfig
5959
}
6060

6161
// SSLKeyPairID is a unique identifier for a SSLKeyPair.
@@ -448,9 +448,9 @@ type DeploymentContext struct {
448448
Integration string `json:"integration"`
449449
}
450450

451-
// WafConfig holds the WAF configuration for the dataplane.
451+
// WAFConfig holds the WAF configuration for the dataplane.
452452
// It is used to determine whether WAF is enabled and to load the WAF module.
453-
type WafConfig struct {
453+
type WAFConfig struct {
454454
// Enabled indicates whether WAF is enabled.
455455
Enabled bool
456456
}

0 commit comments

Comments
 (0)