Cloudflare changelogs | RulesCloudflare changelogs for Ruleshttps://developers.cloudflare.com/changelog/Rules - New TCP-based fields available in Rulesetshttps://developers.cloudflare.com/changelog/2025-10-30-tcp-rtt-and-tcp-fields/https://developers.cloudflare.com/changelog/2025-10-30-tcp-rtt-and-tcp-fields/<h4>Build rules based on TCP transport and latency</h4> <p>Cloudflare now provides two new request fields in the Ruleset engine that let you make decisions based on whether a request used TCP and the measured TCP round-trip time between the client and Cloudflare. These fields help you understand protocol usage across your traffic and build policies that respond to network performance. For example, you can distinguish TCP from QUIC traffic or route high latency requests to alternative origins when needed.</p> <hr> <h4>New fields</h4> <table><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>cf.edge.client_tcp</code></td><td>Boolean</td><td>Indicates whether the request used TCP. A value of true means the client connected using TCP instead of QUIC.</td></tr><tr><td><code>cf.timings.client_tcp_rtt_msec</code></td><td>Number</td><td>Reports the smoothed TCP round-trip time between the client and Cloudflare in milliseconds. For example, a value of 20 indicates roughly twenty milliseconds of RTT.</td></tr></tbody></table> <p>Example filter expression:</p> <div><figure><pre data-language="plaintext"><code class="language-plaintext"><div><div><span>cf.edge.client_tcp &#x26;&#x26; cf.timings.client_tcp_rtt_msec &#x3C; 100</span></div></div></code></pre><div></div></figure></div> <p>More information can be found in the Rules language <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields/reference/">fields reference</a>.</p>Thu, 30 Oct 2025 00:00:00 GMTRulesRulesRules - More flexible fallback handling — Custom Errors now support fetching assets returned with 4xx or 5xx status codeshttps://developers.cloudflare.com/changelog/2025-06-09-custom-errors-fetch-4xx-5xx-assets/https://developers.cloudflare.com/changelog/2025-06-09-custom-errors-fetch-4xx-5xx-assets/<p><a href="https://developers.cloudflare.com/rules/custom-errors/">Custom Errors</a> can now fetch and store <a href="https://developers.cloudflare.com/rules/custom-errors/create-rules/#create-a-custom-error-asset-dashboard">assets</a> and <a href="https://developers.cloudflare.com/rules/custom-errors/#error-pages">error pages</a> from your origin even if they are served with a 4xx or 5xx HTTP status code — previously, only 200 OK responses were allowed.</p> <p><strong>What’s new:</strong></p> <ul> <li>You can now upload error pages and error assets that return error status codes (for example, 403, 500, 502, 503, 504) when fetched.</li> <li>These assets are stored and minified at the edge, so they can be reused across multiple Custom Error rules without triggering requests to the origin.</li> </ul> <p>This is especially useful for retrieving error content or downtime banners from your backend when you can’t override the origin status code.</p> <p>Learn more in the <a href="https://developers.cloudflare.com/rules/custom-errors/">Custom Errors</a> documentation.</p>Mon, 09 Jun 2025 00:00:00 GMTRulesRulesRules - Match Workers subrequests by upstream zone — cf.worker.upstream_zone now supported in Transform Ruleshttps://developers.cloudflare.com/changelog/2025-06-09-transform-rule-subrequest-matching/https://developers.cloudflare.com/changelog/2025-06-09-transform-rule-subrequest-matching/<p>You can now use the <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields/reference/cf.worker.upstream_zone/"><code>cf.worker.upstream_zone</code></a> field in <a href="https://developers.cloudflare.com/rules/transform/">Transform Rules</a> to control rule execution based on whether a request originates from <a href="https://developers.cloudflare.com/workers/">Workers</a>, including subrequests issued by Workers in other zones.</p> <starlight-image-zoom-zoomable><img src="https://developers.cloudflare.com/_astro/transform-rule-subrequest-matching.BeUBEN67_10A2ms.webp" alt="Match Workers subrequests by upstream zone in Transform Rules"></starlight-image-zoom-zoomable> <p><strong>What's new:</strong></p> <ul> <li><code>cf.worker.upstream_zone</code> is now supported in Transform Rules expressions.</li> <li>Skip or apply logic conditionally when handling <a href="https://developers.cloudflare.com/workers/platform/limits/#subrequests">Workers subrequests</a>.</li> </ul> <p>For example, to add a header when the subrequest comes from another zone:</p> <article> <p> <span></span> </p> <div> <p>Text in <strong>Expression Editor</strong> (replace <code>myappexample.com</code> with your domain):</p><div><figure><pre data-language="txt"><code class="language-txt"><div><div><span>(cf.worker.upstream_zone != "" and cf.worker.upstream_zone != "myappexample.com")</span></div></div></code></pre><div></div></figure></div><p>Selected operation under <strong>Modify request header</strong>: <em>Set static</em></p><p><strong>Header name</strong>: <code>X-External-Workers-Subrequest</code></p><p><strong>Value</strong>: <code>1</code></p> </div> </article> <p>This gives you more granular control in how you handle incoming requests for your zone.</p> <p>Learn more in the <a href="https://developers.cloudflare.com/rules/transform/">Transform Rules</a> documentation and <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields/reference/">Rules language fields</a> reference.</p>Mon, 09 Jun 2025 00:00:00 GMTRulesRulesRules - Fine-tune image optimization — WebP now supported in Configuration Ruleshttps://developers.cloudflare.com/changelog/2025-05-30-configuration-rules-webp/https://developers.cloudflare.com/changelog/2025-05-30-configuration-rules-webp/<p>You can now enable <a href="https://developers.cloudflare.com/images/polish/activate-polish/">Polish</a> with the <code>webp</code> format directly in <a href="https://developers.cloudflare.com/rules/configuration-rules/">Configuration Rules</a>, allowing you to optimize image delivery for specific routes, user agents, or A/B tests — without applying changes zone-wide.</p> <p><strong>What’s new:</strong></p> <ul> <li><a href="https://developers.cloudflare.com/images/polish/compression/#webp">WebP</a> is now a supported <a href="https://developers.cloudflare.com/rules/configuration-rules/settings/#polish">value</a> in the <strong>Polish</strong> setting for Configuration Rules.</li> </ul> <starlight-image-zoom-zoomable><img src="https://developers.cloudflare.com/_astro/configuration-rules-webp.Yn1cpqht_Z1nxJDI.webp" alt="New webp option in Polish setting of Configuration Rules"></starlight-image-zoom-zoomable> <p>This gives you more precise control over how images are compressed and delivered, whether you're targeting modern browsers, running experiments, or tailoring performance by geography or device type.</p> <p>Learn more in the <a href="https://developers.cloudflare.com/images/polish/">Polish</a> and <a href="https://developers.cloudflare.com/rules/configuration-rules/">Configuration Rules</a> documentation.</p>Fri, 30 May 2025 00:00:00 GMTRulesRulesRules - More ways to match — Snippets now support Custom Lists, Bot Score, and WAF Attack Scorehttps://developers.cloudflare.com/changelog/2025-05-09-snippets-cloud-connector-lists-waf-bot-scores/https://developers.cloudflare.com/changelog/2025-05-09-snippets-cloud-connector-lists-waf-bot-scores/<p>You can now use IP, Autonomous System (AS), and Hostname <a href="https://developers.cloudflare.com/waf/tools/lists/custom-lists/">custom lists</a> to route traffic to <a href="https://developers.cloudflare.com/rules/snippets/">Snippets</a> and <a href="https://developers.cloudflare.com/rules/cloud-connector/">Cloud Connector</a>, giving you greater precision and control over how you match and process requests at the edge.</p> <p>In Snippets, you can now also match on <a href="https://developers.cloudflare.com/bots/concepts/bot-score/">Bot Score</a> and <a href="https://developers.cloudflare.com/waf/detections/attack-score/">WAF Attack Score</a>, unlocking smarter edge logic for everything from request filtering and mitigation to <a href="https://developers.cloudflare.com/rules/snippets/examples/slow-suspicious-requests/">tarpitting</a> and logging.</p> <p><strong>What’s new:</strong></p> <ul> <li><a href="https://developers.cloudflare.com/waf/tools/lists/custom-lists/">Custom lists</a> matching – Snippets and Cloud Connector now support user-created IP, AS, and Hostname lists via dashboard or <a href="https://developers.cloudflare.com/api/resources/rules/subresources/lists/methods/list/">Lists API</a>. Great for shared logic across zones.</li> <li><a href="https://developers.cloudflare.com/bots/concepts/bot-score/">Bot Score</a> and <a href="https://developers.cloudflare.com/waf/detections/attack-score/">WAF Attack Score</a> – Use Cloudflare’s intelligent traffic signals to detect bots or attacks and take advanced, tailored actions with just a few lines of code.</li> </ul> <starlight-image-zoom-zoomable><img src="https://developers.cloudflare.com/_astro/snippets-lists-scores.D05l6zgc_2dknVs.webp" alt="New fields in Snippets"></starlight-image-zoom-zoomable> <p>These enhancements unlock new possibilities for building smarter traffic workflows with minimal code and maximum efficiency.</p> <p>Learn more in the <a href="https://developers.cloudflare.com/rules/snippets/">Snippets</a> and <a href="https://developers.cloudflare.com/rules/cloud-connector/">Cloud Connector</a> documentation.</p>Fri, 09 May 2025 00:00:00 GMTRulesRulesRules - Custom Errors are now Generally Availablehttps://developers.cloudflare.com/changelog/2025-04-24-custom-errors-ga/https://developers.cloudflare.com/changelog/2025-04-24-custom-errors-ga/<p><a href="https://developers.cloudflare.com/rules/custom-errors/">Custom Errors</a> are now generally available for all paid plans — bringing a unified and powerful experience for customizing error responses at both the zone and account levels.</p> <p>You can now manage <strong>Custom Error Rules</strong>, <strong>Custom Error Assets</strong>, and redesigned <strong>Error Pages</strong> directly from the Cloudflare dashboard. These features let you deliver tailored messaging when errors occur, helping you maintain brand consistency and improve user experience — whether it’s a 404 from your origin or a security challenge from Cloudflare.</p> <p>What's new:</p> <ul> <li><strong>Custom Errors are now GA</strong> – Available on all paid plans and ready for production traffic.</li> <li><strong>UI for Custom Error Rules and Assets</strong> – Manage your zone-level rules from the Rules > Overview and your zone-level assets from the Rules > Settings tabs.</li> <li><strong>Define inline content or upload assets</strong> – Create custom responses directly in the rule builder, upload new or reuse previously stored assets.</li> <li><strong>Refreshed UI and new name for Error Pages</strong> – Formerly known as “Custom Pages,” Error Pages now offer a cleaner, more intuitive experience for both zone and account-level configurations.</li> <li><strong>Powered by Ruleset Engine</strong> – Custom Error Rules support <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/">conditional logic</a> and override Error Pages for 500 and 1000 class errors, as well as errors originating from your origin or <a href="https://developers.cloudflare.com/ruleset-engine/reference/phases-list/">other Cloudflare products</a>. You can also configure <a href="https://developers.cloudflare.com/rules/transform/response-header-modification/">Response Header Transform Rules</a> to add, change, or remove HTTP headers from responses returned by Custom Error Rules.</li> </ul> <starlight-image-zoom-zoomable><img src="https://developers.cloudflare.com/_astro/custom-errors.fNWgSqzO_2tET06.webp" alt="Custom Errors GA"></starlight-image-zoom-zoomable> <p>Learn more in the <a href="https://developers.cloudflare.com/rules/custom-errors/">Custom Errors documentation</a>.</p>Thu, 24 Apr 2025 00:00:00 GMTRulesRulesRules - Cloudflare Snippets are now Generally Availablehttps://developers.cloudflare.com/changelog/2025-04-09-snippets-ga/https://developers.cloudflare.com/changelog/2025-04-09-snippets-ga/<starlight-image-zoom-zoomable><img src="https://developers.cloudflare.com/_astro/snippets-ga.BJr3csvv_13Ki1x.webp" alt="Cloudflare Snippets are now GA"></starlight-image-zoom-zoomable> <p><a href="https://developers.cloudflare.com/rules/snippets/">Cloudflare Snippets</a> are now generally available at no extra cost across all paid plans — giving you a fast, flexible way to programmatically control HTTP traffic using lightweight JavaScript.</p> <p>You can now use Snippets to modify HTTP requests and responses with confidence, reliability, and scale. Snippets are production-ready and deeply integrated with Cloudflare Rules, making them ideal for everything from quick dynamic header rewrites to advanced routing logic.</p> <p>What's new:</p> <ul> <li> <p><strong>Snippets are now GA</strong> – Available at no extra cost on all Pro, Business, and Enterprise plans.</p> </li> <li> <p><strong>Ready for production</strong> – Snippets deliver a production-grade experience built for scale.</p> </li> <li> <p><strong>Part of the Cloudflare Rules platform</strong> – Snippets inherit request modifications from other Cloudflare products and support sequential execution, allowing you to run multiple Snippets on the same request and apply custom modifications step by step.</p> </li> <li> <p><strong>Trace integration</strong> – Use <a href="https://developers.cloudflare.com/rules/trace-request/">Cloudflare Trace</a> to see which Snippets were triggered on a request — helping you understand traffic flow and debug more effectively.</p> <p><starlight-image-zoom-zoomable><img src="https://developers.cloudflare.com/_astro/snippets-ga-trace.WlCshaFo_Z1nO7sf.webp" alt="Snippets shown in Cloudflare Trace results"></starlight-image-zoom-zoomable></p> </li> </ul> <p>Learn more in the <a href="https://blog.cloudflare.com/snippets/" target="_blank">launch blog post</a>.</p>Wed, 09 Apr 2025 00:00:00 GMTRulesRulesRules - Increased Cloudflare Rules limitshttps://developers.cloudflare.com/changelog/2025-02-12-rules-upgraded-limits/https://developers.cloudflare.com/changelog/2025-02-12-rules-upgraded-limits/<p>We have upgraded and streamlined <a href="https://developers.cloudflare.com/rules/">Cloudflare Rules</a> limits across all plans, simplifying rule management and improving scalability for everyone.</p> <p><strong>New limits by product:</strong> - <a href="https://developers.cloudflare.com/rules/url-forwarding/bulk-redirects/">Bulk Redirects</a> - Free: <strong>20</strong> → <strong>10,000</strong> URL redirects across lists - Pro: <strong>500</strong> → <strong>25,000</strong> URL redirects across lists - Business: <strong>500</strong> → <strong>50,000</strong> URL redirects across lists - Enterprise: <strong>10,000</strong> → <strong>1,000,000</strong> URL redirects across lists - <a href="https://developers.cloudflare.com/rules/cloud-connector/">Cloud Connector</a> - Free: <strong>5</strong> → <strong>10</strong> connectors - Enterprise: <strong>125</strong> → <strong>300</strong> connectors - <a href="https://developers.cloudflare.com/rules/custom-errors/">Custom Errors</a> - Pro: <strong>5</strong> → <strong>25</strong> error assets and rules - Business: <strong>20</strong> → <strong>50</strong> error assets and rules - Enterprise: <strong>50</strong> → <strong>300</strong> error assets and rules - <a href="https://developers.cloudflare.com/rules/snippets/">Snippets</a> - Pro: <strong>10</strong> → <strong>25</strong> code snippets and rules - Business: <strong>25</strong> → <strong>50</strong> code snippets and rules - Enterprise: <strong>50</strong> → <strong>300</strong> code snippets and rules - <a href="https://developers.cloudflare.com/cache/how-to/cache-rules/">Cache Rules</a>, <a href="https://developers.cloudflare.com/rules/configuration-rules/">Configuration Rules</a>, <a href="https://developers.cloudflare.com/rules/compression-rules/">Compression Rules</a>, <a href="https://developers.cloudflare.com/rules/origin-rules/">Origin Rules</a>, <a href="https://developers.cloudflare.com/rules/url-forwarding/single-redirects/">Single Redirects</a>, and <a href="https://developers.cloudflare.com/rules/transform/">Transform Rules</a> - Enterprise: <strong>125</strong> → <strong>300</strong> rules</p> <aside><p>Gradual rollout</p><div><p>Limits are updated gradually. Some customers may still see previous limits until the rollout is fully completed in the first half of 2025.</p></div></aside>Wed, 12 Feb 2025 00:00:00 GMTRulesRulesRules - Custom Errors (beta): Stored Assets & Account-level Ruleshttps://developers.cloudflare.com/changelog/2025-02-11-custom-errors-beta/https://developers.cloudflare.com/changelog/2025-02-11-custom-errors-beta/<p>We're introducing <a href="https://developers.cloudflare.com/rules/custom-errors/">Custom Errors</a> (beta), which builds on our existing Custom Error Responses feature with new asset storage capabilities.</p> <p>This update allows you to store externally hosted error pages on Cloudflare and reference them in custom error rules, eliminating the need to supply inline content.</p> <p>This brings the following new capabilities:</p> <ul> <li><strong>Custom error assets</strong> – Fetch and store external error pages at the edge for use in error responses.</li> <li><strong>Account-Level custom errors</strong> – Define error handling rules and assets at the account level for consistency across multiple zones. Zone-level rules take precedence over account-level ones, and assets are not shared between levels.</li> </ul> <p>You can use Cloudflare API to upload your existing assets for use with Custom Errors:</p> <div><figure><pre data-language="bash"><code class="language-bash"><div><div><span>curl</span><span> </span><span>"https://api.cloudflare.com/client/v4/zones/{zone_id}/custom_pages/assets"</span><span> </span><span>\</span></div></div><div><div><span>--header </span><span>"Authorization: Bearer &#x3C;API_TOKEN>"</span><span> </span><span>\</span></div></div><div><div><span>--header </span><span>'Content-Type: application/json'</span><span> </span><span>\</span></div></div><div><div><span>--data </span><span>'{</span></div></div><div><div><span><span> </span></span><span>"name": "maintenance",</span></div></div><div><div><span><span> </span></span><span>"description": "Maintenance template page",</span></div></div><div><div><span><span> </span></span><span>"url": "https://example.com/"</span></div></div><div><div><span>}'</span></div></div></code></pre><div></div></figure></div> <p>You can then reference the stored asset in a Custom Error rule:</p> <div><figure><pre data-language="bash"><code class="language-bash"><div><div><span>curl</span><span> </span><span>--request</span><span> </span><span>PUT</span><span> </span><span>\</span></div></div><div><div><span>"https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/phases/http_custom_errors/entrypoint"</span><span> </span><span>\</span></div></div><div><div><span>--header </span><span>"Authorization: Bearer &#x3C;API_TOKEN>"</span><span> </span><span>\</span></div></div><div><div><span>--header </span><span>'Content-Type: application/json'</span><span> </span><span>\</span></div></div><div><div><span>--data </span><span>'{</span></div></div><div><div><span><span> </span></span><span>"rules": [</span></div></div><div><div><span><span> </span></span><span>{</span></div></div><div><div><span><span> </span></span><span>"action": "serve_error",</span></div></div><div><div><span><span> </span></span><span>"action_parameters": {</span></div></div><div><div><span><span> </span></span><span>"asset_name": "maintenance",</span></div></div><div><div><span><span> </span></span><span>"content_type": "text/html",</span></div></div><div><div><span><span> </span></span><span>"status_code": 503</span></div></div><div><div><span><span> </span></span><span>},</span></div></div><div><div><span><span> </span></span><span>"enabled": true,</span></div></div><div><div><span><span> </span></span><span>"expression": "http.request.uri.path contains \"error\""</span></div></div><div><div><span><span> </span></span><span>}</span></div></div><div><div><span><span> </span></span><span>]</span></div></div><div><div><span>}'</span></div></div></code></pre><div></div></figure></div>Tue, 11 Feb 2025 00:00:00 GMTRulesRulesRules - New Snippets Code Editorhttps://developers.cloudflare.com/changelog/2025-01-29-snippets-code-editor/https://developers.cloudflare.com/changelog/2025-01-29-snippets-code-editor/<p>The new <a href="https://developers.cloudflare.com/rules/snippets/">Snippets</a> code editor lets you edit Snippet code and rule in one place, making it easier to test and deploy changes without switching between pages.</p> <starlight-image-zoom-zoomable><img src="https://developers.cloudflare.com/_astro/snippets-new-editor.CaoIu2_-_ZG70A3.webp" alt="New Snippets code editor"></starlight-image-zoom-zoomable> <p>What’s new:</p> <ul> <li><strong>Single-page editing for code and rule</strong> – No need to jump between screens.</li> <li><strong>Auto-complete &#x26; syntax highlighting</strong> – Get suggestions and avoid mistakes.</li> <li><strong>Code formatting &#x26; refactoring</strong> – Write cleaner, more readable code.</li> </ul> <p>Try it now in <a href="https://dash.cloudflare.com/?to=/:account/:zone/rules/snippets" target="_blank">Rules > Snippets</a>.</p>Wed, 29 Jan 2025 00:00:00 GMTRulesRulesRules - New Rules Overview Interfacehttps://developers.cloudflare.com/changelog/2025-01-09-rules-overview/https://developers.cloudflare.com/changelog/2025-01-09-rules-overview/<p><strong>Rules Overview</strong> gives you a single page to manage all your <a href="https://developers.cloudflare.com/rules/">Cloudflare Rules</a>.</p> <starlight-image-zoom-zoomable><img src="https://developers.cloudflare.com/_astro/rules-overview.CIM4XBmc_11S3LQ.webp" alt="Rules Overview Interface"></starlight-image-zoom-zoomable> <p>What you can do:</p> <ul> <li><strong>See all your rules in one place</strong> – No more clicking around.</li> <li><strong>Find rules faster</strong> – Search by name.</li> <li><strong>Understand execution order</strong> – See how rules run in sequence.</li> <li><strong>Debug easily</strong> – Use <a href="https://developers.cloudflare.com/rules/trace-request/">Trace</a> without switching tabs.</li> </ul> <p>Check it out in <a href="https://dash.cloudflare.com/?to=/:account/:zone/rules/overview" target="_blank">Rules > Overview</a>.</p>Thu, 09 Jan 2025 00:00:00 GMTRulesRulesRules - Terraform Support for Snippetshttps://developers.cloudflare.com/changelog/2024-12-11-terraform-snippets/https://developers.cloudflare.com/changelog/2024-12-11-terraform-snippets/<p>Now, you can manage <a href="https://developers.cloudflare.com/rules/snippets/">Cloudflare Snippets</a> with <a href="https://developers.cloudflare.com/terraform/">Terraform</a>. Use infrastructure-as-code to deploy and update Snippet code and rules without manual changes in the dashboard.</p> <p>Example Terraform configuration:</p> <div><figure><pre data-language="tf"><code class="language-tf"><div><div><span>resource</span><span> </span><span>"cloudflare_snippet"</span><span> </span><span>"my_snippet"</span><span> </span><span>{</span></div></div><div><div><span> </span><span>zone_id</span><span> </span><span>=</span><span> </span><span>"&#x3C;ZONE_ID>"</span></div></div><div><div><span> </span><span>name</span><span> </span><span>=</span><span> </span><span>"my_test_snippet_1"</span></div></div><div><div><span> </span><span>main_module</span><span> </span><span>=</span><span> </span><span>"file1.js"</span></div></div><div><div><span> </span><span>files</span><span> </span><span>{</span></div></div><div><div><span> </span><span>name</span><span> </span><span>=</span><span> </span><span>"file1.js"</span></div></div><div><div><span> </span><span>content</span><span> </span><span>=</span><span> </span><span>file</span><span>(</span><span>"file1.js"</span><span>)</span></div></div><div><div><span> </span><span>}</span></div></div><div><div><span>}</span></div></div><div><div> </div></div><div><div><span>resource</span><span> </span><span>"cloudflare_snippet_rules"</span><span> </span><span>"cookie_snippet_rule"</span><span> </span><span>{</span></div></div><div><div><span> </span><span>zone_id</span><span> </span><span>=</span><span> </span><span>"&#x3C;ZONE_ID>"</span></div></div><div><div><span> </span><span>rules</span><span> </span><span>{</span></div></div><div><div><span> </span><span>enabled</span><span> </span><span>=</span><span> </span><span>true</span></div></div><div><div><span> </span><span>expression</span><span> </span><span>=</span><span> </span><span>"http.cookie eq </span><span>\"</span><span>a=b</span><span>\"</span><span>"</span></div></div><div><div><span> </span><span>description</span><span> </span><span>=</span><span> </span><span>"Trigger snippet on specific cookie"</span></div></div><div><div><span> </span><span>snippet_name</span><span> </span><span>=</span><span> </span><span>"my_test_snippet_1"</span></div></div><div><div><span> </span><span>}</span></div></div><div><div><span> </span><span>depends_on</span><span> </span><span>=</span><span> </span><span>[</span><span><span>cloudflare_snippet</span><span>.</span></span><span>my_snippet</span><span>]</span></div></div><div><div><span>}</span></div></div></code></pre><div></div></figure></div> <p>Learn more in the <a href="https://developers.cloudflare.com/rules/snippets/create-terraform/">Configure Snippets using Terraform</a> documentation.</p>Wed, 11 Dec 2024 00:00:00 GMTRulesRulesRules - Cloud Connector Now Supports R2https://developers.cloudflare.com/changelog/2024-11-22-cloud-connector-r2/https://developers.cloudflare.com/changelog/2024-11-22-cloud-connector-r2/<p>Now, you can use <a href="https://developers.cloudflare.com/rules/cloud-connector/">Cloud Connector</a> to route traffic to your <a href="https://developers.cloudflare.com/r2/">R2 buckets</a> based on URLs, headers, geolocation, and more.</p> <p>Example setup:</p> <div><figure><pre data-language="bash"><code class="language-bash"><div><div><span>curl</span><span> </span><span>--request</span><span> </span><span>PUT</span><span> </span><span>\</span></div></div><div><div><span>"https://api.cloudflare.com/client/v4/zones/{zone_id}/cloud_connector/rules"</span><span> </span><span>\</span></div></div><div><div><span>--header </span><span>"Authorization: Bearer &#x3C;API_TOKEN>"</span><span> </span><span>\</span></div></div><div><div><span>--header </span><span>"Content-Type: application/json"</span><span> </span><span>\</span></div></div><div><div><span>--data </span><span>'[</span></div></div><div><div><span><span> </span></span><span>{</span></div></div><div><div><span><span> </span></span><span>"expression": "http.request.uri.path wildcard \"/images/*\"",</span></div></div><div><div><span><span> </span></span><span>"provider": "cloudflare_r2",</span></div></div><div><div><span><span> </span></span><span>"description": "Connect to R2 bucket containing images",</span></div></div><div><div><span><span> </span></span><span>"parameters": {</span></div></div><div><div><span><span> </span></span><span>"host": "mybucketcustomdomain.example.com"</span></div></div><div><div><span><span> </span></span><span>}</span></div></div><div><div><span><span> </span></span><span>}</span></div></div><div><div><span>]'</span></div></div></code></pre><div></div></figure></div> <p>Get started using <a href="https://developers.cloudflare.com/rules/cloud-connector/">Cloud Connector</a> documentation.</p>Fri, 22 Nov 2024 00:00:00 GMTRulesRulesRules - Simplified UI for URL Rewriteshttps://developers.cloudflare.com/changelog/2024-10-23-url-rewrites-wildcard/https://developers.cloudflare.com/changelog/2024-10-23-url-rewrites-wildcard/<p>It’s now easy to create <strong>wildcard-based <a href="https://developers.cloudflare.com/rules/transform/url-rewrite/">URL Rewrites</a></strong>. No need for complex functions—just define your patterns and go.</p> <starlight-image-zoom-zoomable><img src="https://developers.cloudflare.com/_astro/create-url-rewrite-rule.DIgpB8IB_2nQIvF.webp" alt="Rules Overview Interface"></starlight-image-zoom-zoomable> <p>What’s improved:</p> <ul> <li><strong>Full wildcard support</strong> – Create rewrite patterns using intuitive interface.</li> <li><strong>Simplified rule creation</strong> – No need for complex functions.</li> </ul> <p>Try it via <a href="https://developers.cloudflare.com/rules/transform/url-rewrite/create-dashboard/#wildcard-pattern-parameters">creating a Rewrite URL rule in the dashboard</a>.</p>Wed, 23 Oct 2024 00:00:00 GMTRulesRulesRules - New Rules Templates for One-Click Rule Creationhttps://developers.cloudflare.com/changelog/2024-09-05-rules-templates/https://developers.cloudflare.com/changelog/2024-09-05-rules-templates/<p>Now, you can create <strong>common rule configurations</strong> in just <strong>one click</strong> using Rules Templates.</p> <starlight-image-zoom-zoomable><img src="https://developers.cloudflare.com/_astro/rules-templates.DAV0GOXF_W02LF.webp" alt="Rules Templates"></starlight-image-zoom-zoomable> <p>What you can do:</p> <ul> <li><strong>Pick a pre-built rule</strong> – Choose from a library of templates.</li> <li><strong>One-click setup</strong> – Deploy best practices instantly.</li> <li><strong>Customize as needed</strong> – Adjust templates to fit your setup.</li> </ul> <p>Template cards are now also available directly in the rule builder for each product.</p> <p>Need more ideas? Check out the <a href="https://developers.cloudflare.com/rules/examples/">Examples gallery</a> in our documentation.</p>Thu, 05 Sep 2024 00:00:00 GMTRulesRules