New functions for array and map operations
Cloudflare Rulesets now include new functions that enable advanced expression logic for evaluating arrays and maps. These functions allow you to build rules that match against lists of values in request or response headers, enabling use cases like country-based blocking using custom headers.
New functions
| Function | Description |
|---|---|
split(source, delimiter) | Splits a string into an array of strings using the specified delimiter. |
join(array, delimiter) | Joins an array of strings into a single string using the specified delimiter. |
has_key(map, key) | Returns true if the specified key exists in the map. |
has_value(map, value) | Returns true if the specified value exists in the map. |
Example use cases
Check if a country code exists in a header list:
has_value(split(http.response.headers["x-allow-country"][0], ","), ip.src.country)Check if a specific header key exists:
has_key(http.request.headers, "x-custom-header")Join array values for logging or comparison:
join(http.request.headers.names, ", ")For more information, refer to the Functions reference.
Source: Cloudflare
Latest Posts
- Dynamics 365 Customer Insights – Journeys – Boost engagement with Copilot-powered conversational text messages [MC1265755]
![Dynamics 365 Customer Insights - Journeys - Boost engagement with Copilot-powered conversational text messages [MC1265755] 2 pexels mikhail nilov 6963062](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- (Updated) Microsoft Teams: Secure file and Loop sharing in external 1:1, group and meeting chats [MC1181772]
![(Updated) Microsoft Teams: Secure file and Loop sharing in external 1:1, group and meeting chats [MC1181772] 3 pexels kelly 1179532 2833668](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- (Updated) Microsoft Teams: Collaborative Notes in Chats [MC1148543]
![(Updated) Microsoft Teams: Collaborative Notes in Chats [MC1148543] 4 pexels eberhardgross 1287142](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Power Platform – Move apps out of the default environment [MC1265740]
![Power Platform - Move apps out of the default environment [MC1265740] 5 pexels shkrabaanthony 5243990](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)

![Dynamics 365 Customer Insights - Journeys - Boost engagement with Copilot-powered conversational text messages [MC1265755] 2 pexels mikhail nilov 6963062](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-mikhail-nilov-6963062-150x150.webp)
![(Updated) Microsoft Teams: Secure file and Loop sharing in external 1:1, group and meeting chats [MC1181772] 3 pexels kelly 1179532 2833668](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-kelly-1179532-2833668-150x150.webp)
![(Updated) Microsoft Teams: Collaborative Notes in Chats [MC1148543] 4 pexels eberhardgross 1287142](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-eberhardgross-1287142-150x150.webp)
![Power Platform - Move apps out of the default environment [MC1265740] 5 pexels shkrabaanthony 5243990](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-shkrabaanthony-5243990-150x150.webp)
