Cache - Configure Origin Range Requests with the Rulesets API
- Announced
- Tags
- Cache
- Severity
- info, set by
reef/rss-rule-v1 - Source
- https://developers.cloudflare.com/changelog/post/2026-09-02-origin-range-requests-rulesets-api/
<p>The Rulesets API now supports Origin Range Requests in Cache Rules. This setting lets Cloudflare fetch large files from your origin in cache-aligned byte ranges. Cloudflare may expand a client range and issue several single-range origin requests.</p> <p>Set <code>origin_range_requests.mode</code> to <code>on</code>, <code>off</code>, or <code>default</code> for any traffic matched by a Cache Rule.</p> <p>To override Cloudflare's default Origin Range Requests behavior, set the mode to <code>off</code>. The following rule turns off generated origin range requests for all traffic without changing cache eligibility:</p> <figure class="nb-code-figure" data-nb-lang="json"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="json" data-nb-lang="json"><code><span class="line"><span class="nb-shiki-140thh">{</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "expression"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-mdbnqw">"true"</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "action"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-mdbnqw">"set_cache_settings"</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "action_parameters"</span><span class="nb-shiki-140thh">: {</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "origin_range_requests"</span><span class="nb-shiki-140thh">: {</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "mode"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-mdbnqw">"off"</span></span> <span class="line"><span class="nb-shiki-140thh"> }</span></span> <span class="line"><span class="nb-shiki-140thh"> }</span></span> <span class="line"><span class="nb-shiki-140thh">}</span></span></code></pre></figure> <p>Origin Range Requests do not make otherwise ineligible content cacheable. If your origin ignores <code>Range</code> and returns a complete <code>200 OK</code>, Cloudflare can use the response but must download the complete file. Origins should honor <code>Accept-Encoding: identity</code> and return consistent, unencoded partial responses.</p> <p>For configuration details and mode behavior, refer to <a href="https://developers.cloudflare.com/cache/how-to/cache-rules/settings/#origin-range-requests">Origin Range Requests in Cache Rules</a>. For client responses and the complete origin contract, refer to <a href="https://developers.cloudflare.com/cache/reference/range-requests/">Range request behavior</a>.</p>
The text above is the source's. reef added the severity, the dates it could read from the text, and the endpoints and scopes named in code.