Skip to content

Commit c65f58a

Browse files
Merge pull request #232250 from Miskatonic-Electronic/patch-40
Update configure-waf-custom-rules.md
2 parents f6d58fc + 7747ba2 commit c65f58a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/web-application-firewall/ag/configure-waf-custom-rules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ $wafConfig = New-AzApplicationGatewayWebApplicationFirewallConfiguration -Enable
110110
# Create a User-Agent header custom rule
111111
$variable = New-AzApplicationGatewayFirewallMatchVariable -VariableName RequestHeaders -Selector User-Agent
112112
$condition = New-AzApplicationGatewayFirewallCondition -MatchVariable $variable -Operator Contains -MatchValue "evilbot" -Transform Lowercase -NegationCondition $False
113-
$rule = New-AzApplicationGatewayFirewallCustomRule -Name blockEvilBot -Priority 2 -RuleType MatchRule -MatchCondition $condition -Action Block
113+
$rule = New-AzApplicationGatewayFirewallCustomRule -Name blockEvilBot -Priority 2 -RuleType MatchRule -MatchCondition $condition -Action Block -State Enabled
114114
115115
# Create a geo-match custom rule
116116
$var2 = New-AzApplicationGatewayFirewallMatchVariable -VariableName RemoteAddr
117117
$condition2 = New-AzApplicationGatewayFirewallCondition -MatchVariable $var2 -Operator GeoMatch -MatchValue "US" -NegationCondition $False
118-
$rule2 = New-AzApplicationGatewayFirewallCustomRule -Name allowUS -Priority 14 -RuleType MatchRule -MatchCondition $condition2 -Action Allow
118+
$rule2 = New-AzApplicationGatewayFirewallCustomRule -Name allowUS -Priority 14 -RuleType MatchRule -MatchCondition $condition2 -Action Allow -State Enabled
119119
120120
# Create a firewall policy
121121
$wafPolicy = New-AzApplicationGatewayFirewallPolicy -Name wafpolicyNew -ResourceGroup $rgname -Location $location -CustomRule $rule,$rule2

0 commit comments

Comments
 (0)