Skip to content

Commit 2a81263

Browse files
committed
Fix styling and precendece
1 parent e41b92f commit 2a81263

File tree

4 files changed

+22
-25
lines changed

4 files changed

+22
-25
lines changed

src/content/docs/learning-paths/secure-internet-traffic/build-dns-policies/recommended-dns-policies.mdx

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ Allowlist any known domains and hostnames. With this policy, you ensure that you
2727
<TabItem label="API">
2828

2929
```sh
30-
curl --request POST \
31-
--url https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
32-
--header 'Content-Type: application/json' \
33-
--header "Authorization: Bearer <API TOKEN>" \
30+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
31+
--header "Content-Type: application/json" \
32+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
3433
--data '{
3534
"name": "All-DNS-Domain-Allowlist",
3635
"description": "Organization-wide allowlist. Explicitly allow resolution of these DNS domains",
@@ -84,10 +83,9 @@ resource "cloudflare_zero_trust_gateway_policy" "dns_whitelist_policy" {
8483
<TabItem label="API">
8584

8685
```sh
87-
curl --request POST \
88-
--url https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
89-
--header 'Content-Type: application/json' \
90-
--header "Authorization: Bearer <API TOKEN>" \
86+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
87+
--header "Content-Type: application/json" \
88+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
9189
--data '{
9290
"name": "Quarantined-Users-DNS-Restricted-Access",
9391
"description": "Restrict quarantined users traffic to corporate policy remediation domains, so that quarantined users can obtain help and/or remediate their security posture",
@@ -188,10 +186,9 @@ Block websites hosted in countries categorized as high risk. The designation of
188186
<TabItem label="API">
189187

190188
```sh
191-
curl --request POST \
192-
--url https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
193-
--header 'Content-Type: application/json' \
194-
--header "Authorization: Bearer <API TOKEN>" \
189+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
190+
--header "Content-Type: application/json" \
191+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
195192
--data '{
196193
"name": "All-DNS-GeoCountryIP-Blocklist",
197194
"description": "Block traffic hosted in countries categorized as high security risks",
@@ -251,10 +248,9 @@ Block frequently misused top-level domains (TLDs) to reduce security risks, espe
251248
<TabItem label="API">
252249

253250
```sh
254-
curl --request POST \
255-
--url https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
256-
--header 'Content-Type: application/json' \
257-
--header "Authorization: Bearer <API TOKEN>" \
251+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
252+
--header "Content-Type: application/json" \
253+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
258254
--data '{
259255
"name": "All-DNS-DomainTopLevel-Blocklist",
260256
"description": "Block DNS queries of known risky TLDs",
@@ -315,10 +311,9 @@ Block misused domains to protect your users against sophisticated phishing attac
315311
<TabItem label="API">
316312

317313
```sh
318-
curl --request POST \
319-
--url https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
320-
--header 'Content-Type: application/json' \
321-
--header "Authorization: Bearer <API TOKEN>" \
314+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
315+
--header "Content-Type: application/json" \
316+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
322317
--data '{
323318
"name": "All-DNS-DomainPhishing-Blocklist",
324319
"description": "Block misused domains used in phishing campaigns",
@@ -381,10 +376,9 @@ Block specific IP addresses that are malicious or pose a threat to your organiza
381376
<TabItem label="API">
382377

383378
```sh
384-
curl --request POST \
385-
--url https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
386-
--header 'Content-Type: application/json' \
387-
--header "Authorization: Bearer <API TOKEN>" \
379+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
380+
--header "Content-Type: application/json" \
381+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
388382
--data '{
389383
"name": "All-DNS-ResolvedIP-Blocklist",
390384
"description": "Block specific IP addresses deemed to be a risk to the Organization",
@@ -478,7 +472,7 @@ resource "cloudflare_zero_trust_gateway_policy" "block_dns_domain_host" {
478472
account_id = var.account_id
479473
name = "All-DNS-DomainHost-Blocklist"
480474
description = "Block specific domains or hosts that are malicious or pose a threat to your organization."
481-
precedence = 100
475+
precedence = 90
482476
enabled = false
483477
action = "block"
484478
filters = ["dns"]

src/content/partials/cloudflare-one/gateway/policies/dash-plus-api/dns-block-applications.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rule \
2020
--data '{
2121
"name": "Block unauthorized applications",
2222
"description": "Block access to unauthorized AI applications",
23+
"precedence": 40,
2324
"enabled": true,
2425
"action": "block",
2526
"filters": [

src/content/partials/cloudflare-one/gateway/policies/dash-plus-api/dns-block-content-categories.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rule \
2020
--data '{
2121
"name": "Block content categories",
2222
"description": "Block common content categories that may pose a risk",
23+
"precedence": 30,
2324
"enabled": true,
2425
"action": "block",
2526
"filters": [

src/content/partials/cloudflare-one/gateway/policies/dash-plus-api/dns-block-security-categories.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rule \
2121
--data '{
2222
"name": "Block security threats",
2323
"description": "Block all default Cloudflare DNS security categories",
24+
"precedence": 20,
2425
"enabled": true,
2526
"action": "block",
2627
"filters": [

0 commit comments

Comments
 (0)