Reputation: 5492
I was trying to enable/disable the ApplicationGateway WAF rules using Postman's rest API.
I tried to disable the rules 200003 and 200004 using rest API.
I was using the below URL for the REST API
In the request body, I was using the below JSON code
{
"location": "eastus",
"properties": {
"webApplicationFirewallConfiguration": {
"enabled": true,
"firewallMode": "Prevention",
"ruleSetType": "OWASP",
"ruleSetVersion": "3.2",
"disabledRuleGroups": ["General"],
"rules": [200003,200004],
"requestBodyCheck": true,
"maxRequestBodySizeInKb": 128,
"fileUploadLimitInMb": 100,
"exclusions": []
}
}
}
But when I execute it using Postman I get the error
I could find the following definition from the Azure doc site, but I am not sure how to use it in the Request header https://learn.microsoft.com/en-us/rest/api/application-gateway/application-gateways/create-or-update?tabs=HTTP#applicationgatewayfirewalldisabledrulegroup
Upvotes: 0
Views: 271
Reputation: 136196
Can you try with the following request body:
{
"location": "eastus",
"properties": {
"webApplicationFirewallConfiguration": {
"enabled": true,
"firewallMode": "Prevention",
"ruleSetType": "OWASP",
"ruleSetVersion": "3.2",
"disabledRuleGroups": [{
"ruleGroupName": "General",
"rules": [200003,200004]
}],
"requestBodyCheck": true,
"maxRequestBodySizeInKb": 128,
"fileUploadLimitInMb": 100,
"exclusions": []
}
}
}
Upvotes: 0