feat(botfilter): add addressString
This commit is contained in:
1 parent
982e76179d
commit
04fb522ce7
1 file changed
+7
@@ -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()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user