summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/replacer_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/replacer_test.go')
-rw-r--r--modules/caddyhttp/replacer_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/caddyhttp/replacer_test.go b/modules/caddyhttp/replacer_test.go
index ea9fa65..bc18c5a 100644
--- a/modules/caddyhttp/replacer_test.go
+++ b/modules/caddyhttp/replacer_test.go
@@ -147,6 +147,26 @@ eqp31wM9il1n+guTNyxJd+FzVAH+hCZE5K+tCgVDdVFUlDEHHbS/wqb2PSIoouLV
input: "{http.request.tls.client.subject}",
expect: "CN=client.localdomain",
},
+ {
+ input: "{http.request.tls.client.san.dns_names}",
+ expect: "[localhost]",
+ },
+ {
+ input: "{http.request.tls.client.san.dns_names.0}",
+ expect: "localhost",
+ },
+ {
+ input: "{http.request.tls.client.san.dns_names.1}",
+ expect: "<empty>",
+ },
+ {
+ input: "{http.request.tls.client.san.ips}",
+ expect: "[127.0.0.1]",
+ },
+ {
+ input: "{http.request.tls.client.san.ips.0}",
+ expect: "127.0.0.1",
+ },
} {
actual := repl.ReplaceAll(tc.input, "<empty>")
if actual != tc.expect {