From 84ced83c0b7b939c9bf1d76528a3e9fdbf1d79a1 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Mon, 2 Nov 2020 18:03:28 -0500 Subject: [PATCH] docs: Improve the log example to cover hiding IPs (#101) --- src/docs/markdown/caddyfile/directives/log.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/docs/markdown/caddyfile/directives/log.md b/src/docs/markdown/caddyfile/directives/log.md index 38ad2c7..49ef532 100644 --- a/src/docs/markdown/caddyfile/directives/log.md +++ b/src/docs/markdown/caddyfile/directives/log.md @@ -227,13 +227,14 @@ log { } ``` -Mask the remote address from the request, keeping the first 16 bytes (i.e. 255.255.0.0) for IPv4 addresses, and the first 64 bytes from IPv6 addresses: +Mask the remote address from the request, keeping the first 16 bytes (i.e. 255.255.0.0) for IPv4 addresses, and the first 64 bytes from IPv6 addresses, and also deletes the `common_log` field which would normally contain an unmasked IP address: ```caddy-d log { format filter { wrap console fields { + common_log delete request>remote_addr ip_mask { ipv4 24 ipv6 32