File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
src/content/docs/dns/dns-firewall/random-prefix-attacks Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change 99
1010---
1111
12+ import { APIRequest } from " ~/components" ;
13+
1214In order to enable automatic mitigation of [ random prefix attacks] ( /dns/dns-firewall/random-prefix-attacks/about/ ) :
1315
14161 . Set up [ DNS Firewall] ( /dns/dns-firewall/setup/ ) .
15172 . Send a [ ` PATCH ` request] ( /api/resources/dns_firewall/methods/edit/ ) to update your DNS Firewall cluster.
1618
17- ``` bash
18- curl --request PATCH " https://api.cloudflare.com/client/v4/accounts/{account_id}/dns_firewall/{cluster_tag}" \
19- --header " Authorization: Bearer <API_TOKEN>" \
20- --header " Content-Type: application/json" \
21- --data ' {
22- "attack_mitigation": {
23- "enabled": true,
24- "only_when_upstream_unhealthy": true
25- }
26- }'
27- ```
19+ <APIRequest
20+ path = " /accounts/{account_id}/dns_firewall/{dns_firewall_id}"
21+ method = " PATCH"
22+ json = { {
23+ " attack_mitigation" : {
24+ " enabled" : true ,
25+ " only_when_upstream_unhealthy" : true ,
26+ }
27+ }}
28+ />
2829
2930Once you receive a ` 200 ` success response from the API, queries identified as being part of a random prefix attack will receive a ` REFUSED ` response.
3031
You can’t perform that action at this time.
0 commit comments