Rules - Handle missing values with coalesce()
- Announced
- Tags
- Rules
- Severity
- info, set by
reef/rss-rule-v1 - Source
- https://developers.cloudflare.com/changelog/post/2026-10-01-coalesce-function/
<p>The <code>coalesce()</code> function returns the first argument that is not nil. Use it to provide a fallback in rule expressions:</p> <figure class="nb-code-figure" data-nb-lang="txt"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="txt" data-nb-lang="txt"><code><span class="line"><span class="nb-shiki-wvjl67">http.request.uri.path eq coalesce(http.request.uri.args["expected_path"][0], "/")</span></span></code></pre></figure> <p>For details, refer to the <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/functions/#coalesce"><code>coalesce()</code> function reference</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.