Skip to content

Commit 7ad7c70

Browse files
Remove original bash code blocks
1 parent 4d6f5dd commit 7ad7c70

File tree

3 files changed

+0
-118
lines changed

3 files changed

+0
-118
lines changed

src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/domain-support/custom-metadata.mdx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,6 @@ Please speak with your Solutions Engineer to discuss additional logic and requir
3232

3333
You may add custom metadata to Cloudflare via the Custom Hostnames API. This data can be added via a [`PATCH` request](/api/resources/custom_hostnames/methods/edit/) to the specific hostname ID to set metadata for that hostname, for example:
3434

35-
```bash
36-
curl --request PATCH \
37-
"https://api.cloudflare.com/client/v4/zones/{zone_id}/custom_hostnames/{hostname_id}" \
38-
--header "X-Auth-Email: <EMAIL>" \
39-
--header "X-Auth-Key: <API_KEY>" \
40-
--header "Content-Type: application/json" \
41-
--data '{
42-
"ssl": {
43-
"method": "http",
44-
"type": "dv"
45-
},
46-
"custom_metadata": {
47-
"customer_id": "12345",
48-
"redirect_to_https": true,
49-
"security_tag": "low"
50-
}
51-
}'
52-
```
5335

5436
<APIRequest
5537
path="/zones/{zone_id}/custom_hostnames/{custom_hostname_id}"

src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/performance/early-hints-for-saas.mdx

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,6 @@ Before you can employ Early Hints for SaaS, you need to create a custom hostname
2626

2727
3. If you are [creating a new custom hostname](/api/resources/custom_hostnames/methods/create/), make an API call such as the example below, specifying `"early_hints": "on"`:
2828

29-
```bash
30-
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/custom_hostnames" \
31-
--header "X-Auth-Email: <EMAIL>" \
32-
--header "X-Auth-Key: <API_KEY>" \
33-
--header "Content-Type: application/json" \
34-
--data '{
35-
"hostname": "{hostname}",
36-
"ssl": {
37-
"method": "http",
38-
"type": "dv",
39-
"settings": {
40-
"http2": "on",
41-
"min_tls_version": "1.2",
42-
"tls_1_3": "on",
43-
"early_hints": "on"
44-
},
45-
"bundle_method": "ubiquitous",
46-
"wildcard": false
47-
}
48-
}'
49-
```
50-
5129
<APIRequest
5230
path="/zones/{zone_id}/custom_hostnames"
5331
method="POST"
@@ -70,12 +48,6 @@ curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/custom_hostnames" \
7048

7149
4. For an existing custom hostname, locate the `id` of that hostname via a `GET` call:
7250

73-
```bash
74-
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/custom_hostnames?hostname={hostname}" \
75-
--header "X-Auth-Email: <EMAIL>" \
76-
--header "X-Auth-Key: <API_KEY>"
77-
```
78-
7951
<APIRequest
8052
path="/zones/{zone_id}/custom_hostnames"
8153
method="GET"
@@ -86,26 +58,6 @@ curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/custom_hostnames?host
8658

8759
5. Then make an API call such as the example below, specifying `"early_hints": "on"`:
8860

89-
```bash
90-
curl --request PATCH \
91-
"https://api.cloudflare.com/client/v4/zones/{zone_id}/custom_hostnames/{id}" \
92-
--header "X-Auth-Email: <EMAIL>" \
93-
--header "X-Auth-Key: <API_KEY>" \
94-
--header "Content-Type: application/json" \
95-
--data '{
96-
"ssl": {
97-
"method": "http",
98-
"type": "dv",
99-
"settings": {
100-
"http2": "on", // Note: These settings will be set to default if not included when updating early hints
101-
"min_tls_version": "1.2",
102-
"tls_1_3": "on",
103-
"early_hints": "on"
104-
}
105-
}
106-
}'
107-
```
108-
10961
<APIRequest
11062
path="/zones/{zone_id}/custom_hostnames/{custom_hostname_id}"
11163
method="PATCH"

src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/security/waf-for-saas/index.mdx

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ Before you can use WAF for SaaS, you need to create a custom hostname. Review [G
2020

2121
You can also create a custom hostname through the API:
2222

23-
```bash
24-
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/custom_hostnames" \
25-
--header "X-Auth-Email: <EMAIL>" \
26-
--header "X-Auth-Key: <API_KEY>" \
27-
--header "Content-Type: application/json" \
28-
--data '{"Hostname":"example.com"}, "Ssl":{wildcard:false}}'
29-
```
30-
3123
<APIRequest
3224
path="/zones/{zone_id}/custom_hostnames"
3325
method="POST"
@@ -49,12 +41,6 @@ To apply WAF to your custom hostname, you need to create an association between
4941

5042
3. Locate your custom hostname ID by making a `GET` call in the API:
5143

52-
```bash
53-
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/custom_hostnames" \
54-
--header "X-Auth-Email: <EMAIL>" \
55-
--header "X-Auth-Key: <API_KEY>"
56-
```
57-
5844
<APIRequest
5945
path="/zones/{zone_id}/custom_hostnames"
6046
method="GET"
@@ -70,20 +56,6 @@ One instance of low, medium, and high rules could be rate limiting. You can spec
7056

7157
5. Make an API call in the format below using your Cloudflare email and the IDs gathered above:
7258

73-
```bash
74-
curl --request PATCH \
75-
"https://api.cloudflare.com/client/v4/zones/{zone_id}/custom_hostnames/{custom_hostname_id}" \
76-
--header "X-Auth-Email: <EMAIL>"
77-
--header "X-Auth-Key: <API_KEY>" \
78-
--header "Content-Type: application/json" \
79-
--data '{
80-
"custom_metadata": {
81-
"customer_id": "12345",
82-
"security_level": "low"
83-
}
84-
}'
85-
```
86-
8759
<APIRequest
8860
path="/zones/{zone_id}/custom_hostnames/{custom_hostname_id}"
8961
method="PATCH"
@@ -103,30 +75,6 @@ This assigns custom metadata to your custom hostname so that it has a security t
10375

10476
2. Build your rules either [through the dashboard](/waf/custom-rules/create-dashboard/) or via the API. An example rate limiting rule, corresponding to `"security_level"` low, is shown below as an API call.
10577

106-
```bash
107-
curl --request PUT \
108-
"https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/phases/http_ratelimit/entrypoint" \
109-
--header "Authorization: Bearer <API_TOKEN>" \
110-
--header "Content-Type: application/json" \
111-
--data '{
112-
"rules": [
113-
{
114-
"action": "block",
115-
"ratelimit": {
116-
"characteristics": [
117-
"cf.colo.id",
118-
"ip.src"
119-
],
120-
"period": 10,
121-
"requests_per_period": 2,
122-
"mitigation_timeout": 60
123-
},
124-
"expression": "lookup_json_string(cf.hostname.metadata, \"security_level\") eq \"low\" and http.request.uri contains \"login\""
125-
}
126-
]
127-
}'
128-
```
129-
13078
<APIRequest
13179
path="/zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint"
13280
method="PUT"

0 commit comments

Comments
 (0)