mirror of https://github.com/caddyserver/caddy.git
logging: Fix for IP filtering
This commit is contained in:
parent
eda9a1b377
commit
dd26875ffc
|
@ -141,7 +141,7 @@ func (m IPMaskFilter) Filter(in zapcore.Field) zapcore.Field {
|
||||||
return in
|
return in
|
||||||
}
|
}
|
||||||
mask := m.v4Mask
|
mask := m.v4Mask
|
||||||
if ipAddr.To16() != nil {
|
if ipAddr.To4() == nil {
|
||||||
mask = m.v6Mask
|
mask = m.v6Mask
|
||||||
}
|
}
|
||||||
masked := ipAddr.Mask(mask)
|
masked := ipAddr.Mask(mask)
|
||||||
|
|
Loading…
Reference in New Issue