Skip to content

Commit e2c7966

Browse files
pedrosousadeadlypants1973
authored andcommitted
[Rules] Configuration Rules: Add Request/Response Body Buffering (#27876)
--------- Co-authored-by: Kate Tungusova <70746074+deadlypants1973@users.noreply.github.com>
1 parent 6033406 commit e2c7966

1 file changed

Lines changed: 86 additions & 27 deletions

File tree

src/content/docs/rules/configuration-rules/settings.mdx

Lines changed: 86 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -92,59 +92,81 @@ API configuration property name: `"disable_zaraz"` (boolean).
9292

9393
</Details>
9494

95-
## Hotlink Protection
95+
## Email Obfuscation
9696

97-
[Hotlink Protection](/waf/tools/scrape-shield/hotlink-protection/) prevents your images from being used by other sites, potentially reducing the bandwidth consumed by your origin server.
97+
[Email Obfuscation](/waf/tools/scrape-shield/email-address-obfuscation/) prevents spam by hiding email addresses from bots and harvesters while keeping them visible to human visitors to your site.
9898

99-
Use this setting to turn on or off Hotlink Protection for matching requests.
99+
Use this setting to turn on or off Email Obfuscation for matching requests.
100100

101101
<Details header="API information">
102102

103-
API configuration property name: `"hotlink_protection"` (boolean).
103+
API configuration property name: `"email_obfuscation"` (boolean).
104104

105105
```json title="API configuration example"
106106
"action_parameters": {
107-
"hotlink_protection": false
107+
"email_obfuscation": false
108108
}
109109
```
110110

111111
<Render file="configuration-rule-link-to-examples" product="rules" />
112112

113113
</Details>
114114

115-
## Email Obfuscation
115+
## Fonts
116116

117-
[Email Obfuscation](/waf/tools/scrape-shield/email-address-obfuscation/) helps in spam prevention by hiding email addresses appearing in your pages from email harvesters and other bots, while remaining visible to your site visitors.
117+
[Cloudflare Fonts](/speed/optimization/content/fonts/) rewrites Google Fonts to be delivered from a website's own origin, eliminating the need to rely on third-party font providers.
118118

119-
Use this setting to turn on or off Email Obfuscation for matching requests.
119+
Use this setting to turn on or off Cloudflare Fonts for matching requests.
120120

121121
<Details header="API information">
122122

123-
API configuration property name: `"email_obfuscation"` (boolean).
123+
API configuration property name: `"fonts"` (boolean).
124124

125125
```json title="API configuration example"
126126
"action_parameters": {
127-
"email_obfuscation": false
127+
"fonts": false
128128
}
129129
```
130130

131131
<Render file="configuration-rule-link-to-examples" product="rules" />
132132

133133
</Details>
134134

135-
## Fonts
135+
## Hotlink Protection
136136

137-
[Cloudflare Fonts](/speed/optimization/content/fonts/) rewrites Google Fonts to be delivered from a website's own origin, eliminating the need to rely on third-party font providers.
137+
[Hotlink Protection](/waf/tools/scrape-shield/hotlink-protection/) prevents your images from being used by other sites, potentially reducing the bandwidth consumed by your origin server.
138138

139-
Use this setting to turn on or off Cloudflare Fonts for matching requests.
139+
Use this setting to turn on or off Hotlink Protection for matching requests.
140140

141141
<Details header="API information">
142142

143-
API configuration property name: `"fonts"` (boolean).
143+
API configuration property name: `"hotlink_protection"` (boolean).
144144

145145
```json title="API configuration example"
146146
"action_parameters": {
147-
"fonts": false
147+
"hotlink_protection": false
148+
}
149+
```
150+
151+
<Render file="configuration-rule-link-to-examples" product="rules" />
152+
153+
</Details>
154+
155+
## I'm Under Attack
156+
157+
When enabled, [Under Attack mode](/fundamentals/reference/under-attack-mode/) performs additional security checks to help mitigate layer 7 DDoS attacks. Validated users access your website and suspicious traffic is blocked.
158+
159+
Use this setting to turn on or off Under Attack mode for matching requests.
160+
161+
<Details header="API information">
162+
163+
API configuration property name: `"security_level"` (string).
164+
165+
API values: `"off"`, `"essentially_off"`, `"under_attack"`.
166+
167+
```json title="API configuration example"
168+
"action_parameters": {
169+
"security_level": "under_attack"
148170
}
149171
```
150172

@@ -201,41 +223,78 @@ API values: `"off"`, `"lossless"`, `"lossy"`, `"webp"`.
201223

202224
</Details>
203225

204-
## Rocket Loader
226+
## Request Body Buffering
205227

206-
[Rocket Loader](/speed/optimization/content/rocket-loader/) prioritizes your website's content (such as text, images, and fonts) by deferring the loading of all your JavaScript code until after rendering.
228+
Use the Request Body Buffering setting to configure the request body buffering mode for matching requests:
207229

208-
Use this setting to turn on or off Rocket Loader for matching requests.
230+
- **Standard** (default): Allows Cloudflare products to inspect a prefix of the request body when necessary for enabled functionality on your zone.
231+
- **Full**: Buffers the entire request body before sending the request to your origin server.
232+
- **None**: Strictly no buffering. The request body is streamed directly to the origin server without inspection.
233+
234+
This setting only takes effect on zones running Cloudflare's [latest CDN proxy](https://blog.cloudflare.com/20-percent-internet-upgrade/). Enterprise customers can contact their account team to enable the latest proxy on their zones.
235+
236+
:::caution
237+
Setting request body buffering to **None** may break functionality that requires body inspection. In particular, this can impact the effectiveness of the Web Application Firewall (WAF) and other security features that rely on analyzing request bodies to detect and block threats.
238+
:::
209239

210240
<Details header="API information">
211241

212-
API configuration property name: `"rocket_loader"` (boolean).
242+
API configuration property name: `"request_body_buffering"` (string).
243+
244+
API values: `"standard"`, `"full"`, `"none"`.
213245

214246
```json title="API configuration example"
215247
"action_parameters": {
216-
"rocket_loader": true
248+
"request_body_buffering": "full"
217249
}
218250
```
219251

220252
<Render file="configuration-rule-link-to-examples" product="rules" />
221253

222254
</Details>
223255

224-
## I'm Under Attack
256+
## Response Body Buffering
225257

226-
When enabled, [Under Attack mode](/fundamentals/reference/under-attack-mode/) performs additional security checks to help mitigate layer 7 DDoS attacks. Validated users access your website and suspicious traffic is blocked.
258+
Use the Response Body Buffering setting to configure the response body buffering mode for matching requests:
227259

228-
Use this setting to turn on or off Under Attack mode for matching requests.
260+
- **Standard** (default): Allows Cloudflare products to inspect a prefix of the response body when necessary for enabled functionality on your zone.
261+
- **None**: Strictly no buffering. The response body is streamed directly to the client without inspection.
262+
263+
This setting only takes effect on zones running Cloudflare's [latest CDN proxy](https://blog.cloudflare.com/20-percent-internet-upgrade/). Enterprise customers can contact their account team to enable the latest proxy on their zones.
264+
265+
:::caution
266+
Setting response body buffering to **None** may break functionality that requires body inspection. In particular, this can impact the effectiveness of the Web Application Firewall (WAF) and other security features that rely on analyzing response bodies to detect and block threats.
267+
:::
229268

230269
<Details header="API information">
231270

232-
API configuration property name: `"security_level"` (string).
271+
API configuration property name: `"response_body_buffering"` (string).
233272

234-
API values: `"off"`, `"essentially_off"`, `"under_attack"`.
273+
API values: `"standard"`, `"none"`.
235274

236275
```json title="API configuration example"
237276
"action_parameters": {
238-
"security_level": "under_attack"
277+
"response_body_buffering": "standard"
278+
}
279+
```
280+
281+
<Render file="configuration-rule-link-to-examples" product="rules" />
282+
283+
</Details>
284+
285+
## Rocket Loader
286+
287+
[Rocket Loader](/speed/optimization/content/rocket-loader/) prioritizes your website's content (such as text, images, and fonts) by deferring the loading of all your JavaScript code until after rendering.
288+
289+
Use this setting to turn on or off Rocket Loader for matching requests.
290+
291+
<Details header="API information">
292+
293+
API configuration property name: `"rocket_loader"` (boolean).
294+
295+
```json title="API configuration example"
296+
"action_parameters": {
297+
"rocket_loader": true
239298
}
240299
```
241300

@@ -271,4 +330,4 @@ API values: `"off"`, `"flexible"`, `"full"`, `"strict"`, `"origin_pull"`.
271330

272331
<Render file="configuration-rule-link-to-examples" product="rules" />
273332

274-
</Details>
333+
</Details>

0 commit comments

Comments
 (0)