Skip to content
AnswerWell geo Documentation

Research · 8 min read · Answerwell

HTTP Body Buffering: Request Modes, Response Streaming, and Edge Inspection

How reverse-proxy body buffering modes affect streaming, WAF inspection, HTML transforms, and cache safety on proxied HTTP traffic.

This page summarizes Cloudflare documentation on Request Body Buffering and Response Body Buffering in Configuration Rules, together with related guidance on response body inspection, WAF request body limits, cache security, and Cloudflare Tunnel streaming behavior.

Configuration Rules: why HTTP body buffering exists

Section titled “Configuration Rules: why HTTP body buffering exists”

Configuration Rules let you change how Cloudflare handles HTTP request and response bodies for matching traffic. Buffering is not only a performance knob: it decides whether the edge can inspect or rewrite body content before data reaches your origin or the client.

You can now control how Cloudflare buffers HTTP request and response bodies using two new settings in Configuration Rules.

— Cloudflare, Control request and response body buffering in Configuration Rules

Use path-specific rules when you need streaming on one route but WAF or HTML features on others. The narrowest matching expression reduces collateral impact.

Request Body Buffering: modes before traffic reaches origin

Section titled “Request Body Buffering: modes before traffic reaches origin”

Request Body Buffering (request_body_buffering) controls how Cloudflare buffers HTTP request bodies before forwarding them to your origin server.

Mode Behavior
standard (default) Cloudflare can inspect a prefix of the request body for enabled functionality such as WAF and Bot Management.
full Buffers the entire request body before sending to origin.
none No buffering — the request body streams directly to origin without inspection.

Controls how Cloudflare buffers HTTP request bodies before forwarding them to your origin server.

— Cloudflare, Configuration Rules settings

When to use full vs standard vs none on requests

Section titled “When to use full vs standard vs none on requests”

Standard is appropriate when security products on the zone need to read part of the body (typical default). Full helps when the origin or upstream logic expects the complete body before processing starts, at the cost of latency and memory. None is for large uploads or streaming request bodies where buffering would break the protocol—but anything that depends on reading the request body at the edge may stop working.

API property: request_body_buffering with values "standard", "full", or "none" (Configuration Rules settings).

Response Body Buffering: streaming to clients vs edge inspection

Section titled “Response Body Buffering: streaming to clients vs edge inspection”

Response Body Buffering (response_body_buffering) controls how Cloudflare buffers HTTP response bodies before forwarding them to the client.

Mode Behavior
standard (default) Cloudflare can inspect a prefix of the response body for enabled functionality.
none No buffering — the response body streams directly to the client without inspection.

Use the Response Body Buffering setting to configure the response body buffering mode for matching requests: … None: Strictly no buffering. The response body is streamed directly to the client. Features that change HTML response bodies do not apply their changes.

— Cloudflare, Configuration Rules settings

There is no full mode on the response side in the published settings—only standard and none.

API property: response_body_buffering with values "standard" or "none" (Configuration Rules settings).

Response body inspection: what still runs when buffering is on

Section titled “Response body inspection: what still runs when buffering is on”

When no enabled feature needs response content, Cloudflare can send data to the client as it arrives. Some features inspect or change response content at the edge.

Inspection can hold part of a response at the edge. This may increase time to first byte (TTFB) or delay incremental delivery. The amount of data held depends on the feature and response.

— Cloudflare, Response body inspection

HTML features that change the response body

Section titled “HTML features that change the response body”

Cloudflare features primarily inspect responses with a Content-Type of text/html. When Response Body Buffering is set to None, body-changing features do not apply their changes (Response body inspection).

Feature Body change
AI Labyrinth Adds invisible links for unauthorized AI crawlers
Always Online Adds a banner to archived pages
Automatic HTTPS Rewrites Rewrites eligible HTTP links to HTTPS
Cloudflare challenge features Injects challenge scripts or returns challenge content
Cloudflare Fonts and Automatic Platform Optimization Rewrites Google Fonts references
Email Address Obfuscation Obfuscates email addresses in page content
Markdown for Agents Converts HTML to Markdown for eligible requests
Replace insecure JavaScript libraries Rewrites supported insecure library URLs
Rocket Loader Changes script loading behavior
Web Analytics Injects the Real User Monitoring beacon

Security and AI features may also read HTML without changing it. Explicit rules that inspect response content are excluded from this list—review each rule separately when troubleshooting (Response body inspection).

Streaming APIs: Content-Type and Cache-Control: no-transform

Section titled “Streaming APIs: Content-Type and Cache-Control: no-transform”

Response body inspection most often affects progressive HTML and plain-text streams.

Set an accurate Content-Type at your origin. Do not serve streaming API responses as text/html or text/plain unless that media type is required.

— Cloudflare, Response body inspection

The Cache-Control: no-transform response directive prevents body changes by supported features; it does not prevent read-only inspection (Response body inspection).

WAF managed rules: how much of the request body is analyzed

Section titled “WAF managed rules: how much of the request body is analyzed”

Request buffering and inspection interact with hard size limits on WAF body analysis.

Managed rules inspect the body of each incoming request up to a maximum size. This limit varies by plan: For Enterprise customers, the maximum body size is 128 KB. For other paid plans, the limit is lower by default … For users in the Free plan, the limit is 1 MB.

— Cloudflare, Managed Rules

Content beyond the limit may not be fully analyzed. Larger payloads give rules more to match against, which can raise cumulative threat scores (for example in the OWASP Core Ruleset) and increase false positives. Custom rules can use http.request.body.truncated and http.request.headers.truncated when your plan supports request body fields (Managed Rules).

Streaming troubleshooting: proxy buffering vs origin behavior

Section titled “Streaming troubleshooting: proxy buffering vs origin behavior”

Fix streaming stopped after enabling the proxy

Section titled “Fix streaming stopped after enabling the proxy”

If a response stops streaming after you proxy it through Cloudflare:

  1. Verify that the origin sends data incrementally without Cloudflare.
  2. Check the origin response’s Content-Type and Cache-Control headers.
  3. Review features and rules that apply to the response path.
  4. Create a path-specific Configuration Rule that sets Response Body Buffering to None.
  5. Test the response again through Cloudflare.

The None setting streams the body without inspection. It can prevent security, optimization, and analytics features from working on matching responses. Use the narrowest matching expression possible.

— Cloudflare, Response body inspection

Cloudflare Tunnel and Server-Sent Events (text/event-stream)

Section titled “Cloudflare Tunnel and Server-Sent Events (text/event-stream)”

Tunnel traffic has separate default buffering behavior from Configuration Rules on orange-cloud HTTP routes.

Proxied traffic through Cloudflare Tunnel is buffered by default unless the origin server includes the Content-Type: text/event-stream response header. This header tells cloudflared to stream data as it arrives instead of buffering the entire response.

— Cloudflare, Troubleshooting

The same guidance appears in Common errors and Tunnel troubleshooting. For HTTP proxied through the zone, combine correct Content-Type with a targeted Response Body Buffering rule when inspection features are the cause (Response body inspection).

GET request bodies, caching, and untrusted input

Section titled “GET request bodies, caching, and untrusted input”

Unusual but security-relevant: Cloudflare may cache GET traffic in ways that ignore the request body in the cache key.

Cloudflare caches contents of GET request bodies, but they are not included in the cache key. GET request bodies should be considered untrusted and should not modify the contents of a response. If a GET body can change the contents of a response, consider bypassing cache or using a POST request.

— Cloudflare, Avoid web cache poisoning

This is separate from Configuration Rules buffering modes, but the same principle applies: do not let client-controlled GET bodies change representations that are cached for other clients.

Configuration changes use the set_config action in the http_config_settings phase at zone level (Create a configuration rule via API).

{
"action": "set_config",
"action_parameters": {
"request_body_buffering": "standard",
"response_body_buffering": "none"
}
}

— Cloudflare, Control request and response body buffering in Configuration Rules

SetConfigRule exposes request_body_buffering and response_body_buffering for ruleset deployments. Field names and allowed values are documented under Configuration Rules settings. See Rules changelog for the 2026-01-27 release note.

When creating a rule via API, set the action to set_config, define action_parameters for the settings you want to override, and deploy to http_config_settings (Create a configuration rule via API).

  • Setting Response Body Buffering to None on paths that still need WAF, Bot Management, or HTML optimization—inspection and rewrites silently stop applying.
  • Serving live streams as text/html or text/plain when the payload is not actually HTML or plain text, triggering inspection and chunked delivery (Response body inspection).
  • Forgetting Content-Type: text/event-stream on SSE behind Cloudflare Tunnel while expecting live streaming (Troubleshooting).
  • Assuming WAF sees the entire request body on all plans; truncated bodies change rule matching (Managed Rules).
  • Using GET requests whose body changes the response while responses are cacheable (Avoid web cache poisoning).
  1. Compare time-to-first-byte and chunk arrival direct-to-origin versus through Cloudflare for the same URL; note whether data arrives in one block (Response body inspection).
  2. Record Content-Type, Cache-Control, and whether no-transform is present on streaming endpoints (Response body inspection).
  3. In the dashboard or via API, confirm Configuration Rules for the path set request_body_buffering and response_body_buffering as intended (Configuration Rules settings).
  4. For Tunnel SSE, confirm the origin returns Content-Type: text/event-stream (Troubleshooting).
  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact sentence you are asking about, and we will correct or clarify it.