File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
articles/web-application-firewall/ag Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -110,12 +110,12 @@ $wafConfig = New-AzApplicationGatewayWebApplicationFirewallConfiguration -Enable
110
110
# Create a User-Agent header custom rule
111
111
$variable = New-AzApplicationGatewayFirewallMatchVariable -VariableName RequestHeaders -Selector User-Agent
112
112
$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
114
114
115
115
# Create a geo-match custom rule
116
116
$var2 = New-AzApplicationGatewayFirewallMatchVariable -VariableName RemoteAddr
117
117
$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
119
119
120
120
# Create a firewall policy
121
121
$wafPolicy = New-AzApplicationGatewayFirewallPolicy -Name wafpolicyNew -ResourceGroup $rgname -Location $location -CustomRule $rule,$rule2
You can’t perform that action at this time.
0 commit comments