Skip to content

Commit

Permalink
docs(vrl): Update documentation for ip_cidr_contains (#22463)
Browse files Browse the repository at this point in the history
* docs(vrl): Update documentation for ip_cidr_contains

* cargo update -p vrl

---------

Co-authored-by: Pavlos Rontidis <[email protected]>
  • Loading branch information
JakubOnderka and pront authored Feb 19, 2025
1 parent 970606e commit 63cadc6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion website/cue/reference/remap/functions/ip_cidr_contains.cue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ remap: functions: ip_cidr_contains: {
name: "cidr"
description: "The CIDR mask (v4 or v6)."
required: true
type: ["string"]
type: ["string", "array"]
},
{
name: "ip"
Expand All @@ -34,6 +34,13 @@ remap: functions: ip_cidr_contains: {
"""#
return: true
},
{
title: "IPv4 is private"
source: #"""
ip_cidr_contains!(["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"], "192.168.10.32")
"""#
return: true
},
{
title: "IPv6 contains CIDR"
source: #"""
Expand Down

0 comments on commit 63cadc6

Please sign in to comment.