Skip to content

Commit 81341dc

Browse files
pedrosousasdnts
authored andcommitted
[WAF, Rules] Update placeholders (cloudflare#23888)
1 parent e8a0986 commit 81341dc

File tree

3 files changed

+38
-42
lines changed

3 files changed

+38
-42
lines changed

src/content/docs/rules/reference/esc-deprecation.mdx

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ https://api.cloudflare.com/client/v4
112112
This example obtains the current status of the **Disable ESC** setting for the specified zone. The same endpoint will return the currently configured ESC secret for the zone, if configured.
113113

114114
```bash
115-
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/disable_esc" \
116-
--header "X-Auth-Key: <API_KEY>" \
117-
--header "X-Auth-Email: <EMAIL>"
115+
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/disable_esc" \
116+
--header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
117+
--header "X-Auth-Email: $CLOUDFLARE_EMAIL"
118118
```
119119

120-
The following example response states that ESC is disabled for the entire `{zone_id}` zone:
120+
The following example response states that ESC is disabled for the entire `$ZONE_ID` zone:
121121

122122
```json
123123
{ "always": true }
@@ -131,14 +131,13 @@ The following example response includes the previously configured secret for the
131131

132132
#### Create ESC secret for a zone
133133

134-
This `POST` request example configures an ESC secret for disabling ESC in specific requests for the `{zone_id}` zone, setting the secret to `MySecretString321#`.
134+
This `POST` request example configures an ESC secret for disabling ESC in specific requests for the `$ZONE_ID` zone, setting the secret to `MySecretString321#`.
135135

136136
```bash
137-
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/disable_esc" \
138-
--header "X-Auth-Key: <API_KEY>" \
139-
--header "X-Auth-Email: <EMAIL>" \
140-
--header "Content-Type: application/json" \
141-
--data '{ "with_secret": "MySecretString321#" }'
137+
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/disable_esc" \
138+
--header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
139+
--header "X-Auth-Email: $CLOUDFLARE_EMAIL" \
140+
--json '{ "with_secret": "MySecretString321#" }'
142141
```
143142

144143
The maximum secret length is 100 characters.
@@ -154,38 +153,37 @@ This will only disable ESC for the request that includes the cookie.
154153

155154
#### Disable ESC for a zone
156155

157-
This `POST` request example disables ESC for all incoming requests of `{zone_id}` zone.
156+
This `POST` request example disables ESC for all incoming requests of `$ZONE_ID` zone.
158157

159158
```bash
160-
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/disable_esc" \
161-
--header "X-Auth-Key: <API_KEY>" \
162-
--header "X-Auth-Email: <EMAIL>" \
163-
--header "Content-Type: application/json" \
164-
--data '{ "always": true }'
159+
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/disable_esc" \
160+
--header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
161+
--header "X-Auth-Email: $CLOUDFLARE_EMAIL" \
162+
--json '{ "always": true }'
165163
```
166164

167165
#### Re-enable ESC for a zone
168166

169-
This example re-enables ESC for the `{zone_id}` zone.
167+
This example re-enables ESC for the `$ZONE_ID` zone.
170168

171169
```bash
172170
curl --request DELETE \
173-
"https://api.cloudflare.com/client/v4/zones/{zone_id}/disable_esc" \
174-
--header "X-Auth-Key: <API_KEY>" \
175-
--header "X-Auth-Email: <EMAIL>"
171+
"https://api.cloudflare.com/client/v4/zones/$ZONE_ID/disable_esc" \
172+
--header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
173+
--header "X-Auth-Email: $CLOUDFLARE_EMAIL"
176174
```
177175

178176
#### Get ESC status for an account
179177

180178
This example obtains the current status of **Disable ESC** setting for the specified account. The same endpoint will return the currently configured ESC secret for the account, if configured.
181179

182180
```bash
183-
curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/disable_esc" \
184-
--header "X-Auth-Key: <API_KEY>" \
185-
--header "X-Auth-Email: <EMAIL>"
181+
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/disable_esc" \
182+
--header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
183+
--header "X-Auth-Email: $CLOUDFLARE_EMAIL"
186184
```
187185

188-
The following example response states that ESC is disabled for the entire `{account_id}` account:
186+
The following example response states that ESC is disabled for the entire `$ACCOUNT_ID` account:
189187

190188
```json
191189
{ "always": true }
@@ -199,14 +197,13 @@ The following example response includes the previously configured secret for the
199197

200198
#### Create ESC secret for an account
201199

202-
This example configures an ESC secret for disabling ESC in specific requests for the `{account_id}` account, setting the secret to `MySecretString321#`.
200+
This example configures an ESC secret for disabling ESC in specific requests for the `$ACCOUNT_ID` account, setting the secret to `MySecretString321#`.
203201

204202
```bash
205-
curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/disable_esc" \
206-
--header "X-Auth-Key: <API_KEY>" \
207-
--header "X-Auth-Email: <EMAIL>" \
208-
--header "Content-Type: application/json" \
209-
--data '{ "with_secret": "MySecretString321#" }'
203+
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/disable_esc" \
204+
--header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
205+
--header "X-Auth-Email: $CLOUDFLARE_EMAIL" \
206+
--json '{ "with_secret": "MySecretString321#" }'
210207
```
211208

212209
The maximum secret length is 100 characters.
@@ -222,25 +219,24 @@ This will only disable ESC for the request that includes the cookie.
222219

223220
#### Disable ESC for an account
224221

225-
This `POST` request example disables ESC for all incoming requests of `{account_id}` account.
222+
This `POST` request example disables ESC for all incoming requests of `$ACCOUNT_ID` account.
226223

227224
```bash
228-
curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/disable_esc" \
229-
--header "X-Auth-Key: <API_KEY>" \
230-
--header "X-Auth-Email: <EMAIL>" \
231-
--header "Content-Type: application/json" \
232-
--data '{ "always": true }'
225+
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/disable_esc" \
226+
--header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
227+
--header "X-Auth-Email: $CLOUDFLARE_EMAIL" \
228+
--json '{ "always": true }'
233229
```
234230

235231
#### Re-enable ESC for an account
236232

237-
This example re-enables ESC for the `{account_id}` account.
233+
This example re-enables ESC for the `$ACCOUNT_ID` account.
238234

239235
```bash
240236
curl --request DELETE \
241-
"https://api.cloudflare.com/client/v4/accounts/{account_id}/disable_esc" \
242-
--header "X-Auth-Key: <API_KEY>" \
243-
--header "X-Auth-Email: <EMAIL>"
237+
"https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/disable_esc" \
238+
--header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
239+
--header "X-Auth-Email: $CLOUDFLARE_EMAIL"
244240
```
245241

246242
---

src/content/partials/waf/managed-rulesets/api-account-example.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import { Render, RuleID, APIRequest } from "~/components";
66

7-
The following example deploys the [Cloudflare Managed Ruleset](/waf/managed-rules/reference/cloudflare-managed-ruleset/) to the `http_request_firewall_managed` phase of a given account (`{account_id}`) by creating a rule that executes the managed ruleset. The rules in the managed ruleset are executed when the zone name matches one of `example.com` or `anotherexample.com`.
7+
The following example deploys the [Cloudflare Managed Ruleset](/waf/managed-rules/reference/cloudflare-managed-ruleset/) to the `http_request_firewall_managed` phase of a given account (`$ACCOUNT_ID`) by creating a rule that executes the managed ruleset. The rules in the managed ruleset are executed when the zone name matches one of `example.com` or `anotherexample.com`.
88

99
1. <Render
1010
file="rulesets/api-account/step1-get-entrypoint"

src/content/partials/waf/managed-rulesets/api-zone-example.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import { Render, RuleID, APIRequest } from "~/components";
66

7-
The following example deploys the [Cloudflare Managed Ruleset](/waf/managed-rules/reference/cloudflare-managed-ruleset/) to the `http_request_firewall_managed` phase of a given zone (`{zone_id}`) by creating a rule that executes the managed ruleset.
7+
The following example deploys the [Cloudflare Managed Ruleset](/waf/managed-rules/reference/cloudflare-managed-ruleset/) to the `http_request_firewall_managed` phase of a given zone (`$ZONE_ID`) by creating a rule that executes the managed ruleset.
88

99
1. <Render
1010
file="rulesets/api-zone/step1-get-entrypoint"

0 commit comments

Comments
 (0)