diff --git a/botfilter.go b/botfilter.go index 14f530da..655d7a3e 100644 --- a/botfilter.go +++ b/botfilter.go @@ -91,3 +91,10 @@ func (b *botFilter) reject(rw http.ResponseWriter, ip, reason string, decision c _, _ = io.WriteString(rw, "request denied\n") } +func addressString(addr netip.Addr) string { + if !addr.IsValid() { + return "" + } + return addr.String() +} +