summaryrefslogtreecommitdiff
path: root/caddytest
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2022-05-04 14:42:37 -0400
committerGitHub <noreply@github.com>2022-05-04 12:42:37 -0600
commitec86a2f7a3905c888b8c953255a98a50be70d5db (patch)
treee7021a338e80f226d03de462698e28e2a5ee76f2 /caddytest
parente7fbee8c82740bd3e21c9abdcfe5a1e922244c09 (diff)
caddyfile: Shortcut for `remote_ip` for private IP ranges (#4753)
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/matcher_syntax.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/matcher_syntax.txt b/caddytest/integration/caddyfile_adapt/matcher_syntax.txt
index cb521aa..a3e0a50 100644
--- a/caddytest/integration/caddyfile_adapt/matcher_syntax.txt
+++ b/caddytest/integration/caddyfile_adapt/matcher_syntax.txt
@@ -37,6 +37,9 @@
header Bar foo
}
respond @matcher9 "header matcher with null field matcher"
+
+ @matcher10 remote_ip private_ranges
+ respond @matcher10 "remote_ip matcher with private ranges"
}
----------
{
@@ -209,6 +212,28 @@
"handler": "static_response"
}
]
+ },
+ {
+ "match": [
+ {
+ "remote_ip": {
+ "ranges": [
+ "192.168.0.0/16",
+ "172.16.0.0/12",
+ "10.0.0.0/8",
+ "127.0.0.1/8",
+ "fd00::/8",
+ "::1"
+ ]
+ }
+ }
+ ],
+ "handle": [
+ {
+ "body": "remote_ip matcher with private ranges",
+ "handler": "static_response"
+ }
+ ]
}
]
}