diff options
author | Francis Lavoie <lavofr@gmail.com> | 2021-11-29 01:18:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 01:18:35 -0500 |
commit | f55b123d63132e290789bcd07077375c76b6e1dd (patch) | |
tree | 494cf4f8d85f48d5d3bc3a6e12d74d491710d6cd /caddyconfig | |
parent | 0eb0b60f47bddcf24f6af9265e60044033555ff2 (diff) |
caddyhttp: Split up logged remote address into IP and port (#4403)
Diffstat (limited to 'caddyconfig')
-rw-r--r-- | caddyconfig/httpcaddyfile/builtins_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/caddyconfig/httpcaddyfile/builtins_test.go b/caddyconfig/httpcaddyfile/builtins_test.go index a28229b..991c649 100644 --- a/caddyconfig/httpcaddyfile/builtins_test.go +++ b/caddyconfig/httpcaddyfile/builtins_test.go @@ -37,7 +37,7 @@ func TestLogDirectiveSyntax(t *testing.T) { format filter { wrap console fields { - request>remote_addr ip_mask { + request>remote_ip ip_mask { ipv4 24 ipv6 32 } @@ -46,7 +46,7 @@ func TestLogDirectiveSyntax(t *testing.T) { } } `, - output: `{"logging":{"logs":{"default":{"exclude":["http.log.access.log0"]},"log0":{"encoder":{"fields":{"request\u003eremote_addr":{"filter":"ip_mask","ipv4_cidr":24,"ipv6_cidr":32}},"format":"filter","wrap":{"format":"console"}},"include":["http.log.access.log0"]}}},"apps":{"http":{"servers":{"srv0":{"listen":[":8080"],"logs":{"default_logger_name":"log0"}}}}}}`, + output: `{"logging":{"logs":{"default":{"exclude":["http.log.access.log0"]},"log0":{"encoder":{"fields":{"request\u003eremote_ip":{"filter":"ip_mask","ipv4_cidr":24,"ipv6_cidr":32}},"format":"filter","wrap":{"format":"console"}},"include":["http.log.access.log0"]}}},"apps":{"http":{"servers":{"srv0":{"listen":[":8080"],"logs":{"default_logger_name":"log0"}}}}}}`, expectError: false, }, { |