feat(botfilter): add addressString

This commit is contained in:
hoelee committed 2026-05-22 09:58:00 +08:00
1 parent 51931c49ff
commit 93fb992515
1 file changed
+7
+7
View File
@@ -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()
}