Skip to content

Commit cb0e1eb

Browse files
authored
Merge pull request #124020 from yuvalpery/patch-3
Update waf-front-door-custom-rules.md
2 parents 9fcd888 + c74d609 commit cb0e1eb

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

articles/web-application-firewall/afds/waf-front-door-custom-rules.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,33 @@ Here's an example JSON description of the custom rule:
199199
"action": "Block"
200200
}
201201
```
202+
203+
### Match based on request URI
204+
205+
Suppose you need to allow requests where the URI contains 'login'.
206+
207+
Here's an example JSON description of the custom rule:
208+
209+
```json
210+
{
211+
"name": "URIContainsLogin",
212+
"priority": 5,
213+
"ruleType": "MatchRule",
214+
"matchConditions": [
215+
{
216+
"matchVariable": "RequestUri",
217+
"selector": null,
218+
"operator": "Contains",
219+
"negateCondition": false,
220+
"matchValue": [
221+
"login"
222+
]
223+
}
224+
],
225+
"action": "Allow"
226+
}
227+
```
228+
202229
## Copying and duplicating custom rules
203230

204231
Custom rules can be duplicated within a given policy. When duplicating a rule, you need to specify a unique name for the rule and a unique priority value. Additionally, custom rules can be copied from one Azure Front Door WAF policy to another as long as the policies are both in the same subscription. When copying a rule from one policy to another, you need to select the Azure Front Door WAF policy you wish to copy the rule into. Once you select the WAF policy you need to give the rule a unique name, and assign a priority rank.

0 commit comments

Comments
 (0)