Cloudflare Rules' concat() just doubled its argument limit, from 16 to 32!
Hey everyone, it's Shiichan! Today I found a small but genuinely useful little update!
Cloudflare ChangelogWhat was announced?
Cloudflare's Changelog announced that the concat() function in Cloudflare Rules now accepts up to 32 arguments, up from 16. That means you can build richer dynamic values directly inside Rules expressions.
Why it matters
concat() is the function you reach for when you want to combine request information into a single value: IP address, country, hostname, path, and so on. Needing to chain a lot of fields together is more common than you'd think, and being capped at 16 arguments meant you sometimes had to split expressions or work around the limit. It was a small but real annoyance.
What changes
With the limit raised to 32, you can now pack a lot more information into a single concat() expression. For example, using a Rulesets API Request Header Transform Rule (in the http_request_late_transform phase), you can build one custom header for your origin that bundles together request and network details.
Dive Deep
The example in the Changelog uses an 18-argument concat() expression to combine fields like:
ip.src(source IP)ip.src.country(source country)http.host(hostname)http.request.method(HTTP method)http.request.uri.path(path)http.request.uri.query(query string)cf.ray_id(Ray ID)ip.src.asnum(source ASN)http.user_agent(user agent)
Bundling all of that into one header value gives your origin a lot more to work with in its logs and logic. It looks like a small change, but it's the kind of update that really helps once you're building complex Rules expressions.
Wrap-up
- Cloudflare Rules'
concat()function now supports up to 32 arguments, up from 16 - You can combine more values in a single expression
- The Changelog shows an example using a Rulesets API Request Header Transform Rule to bundle request and network info into one header
This is a quiet but genuinely helpful update for engineers building complex Rules expressions!