Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
logging: Fix for IP filtering
Christoph Kluge committed
Nov 3, 2020 at 00:01 UTC
dd26875ffcbec8b74234bdda64e019a8a20c37e2
1 file changed
+1
-1
modules/logging/filters.go
+1
-1
@@ -141,7 +141,7 @@ func (m IPMaskFilter) Filter(in zapcore.Field) zapcore.Field {
141
return in
142
}
143
mask := m.v4Mask
144
- if ipAddr.To16() != nil {
144
+ if ipAddr.To4() == nil {
145
mask = m.v6Mask
146
}
147
masked := ipAddr.Mask(mask)