Skip to content

Commit f4adacb

Browse files
Apply in dns-firewall and fix {cluster_tag} with {dns_firewall_id}
1 parent 6163750 commit f4adacb

File tree

1 file changed

+12
-11
lines changed
  • src/content/docs/dns/dns-firewall/random-prefix-attacks

1 file changed

+12
-11
lines changed

src/content/docs/dns/dns-firewall/random-prefix-attacks/setup.mdx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,23 @@ head:
99

1010
---
1111

12+
import { APIRequest } from "~/components";
13+
1214
In order to enable automatic mitigation of [random prefix attacks](/dns/dns-firewall/random-prefix-attacks/about/):
1315

1416
1. Set up [DNS Firewall](/dns/dns-firewall/setup/).
1517
2. 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

2930
Once 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

0 commit comments

Comments
 (0)