Files
smallwebwaf/internal/waf/export_test.go
T
clawbot 3060788ca3
check / check (push) Waiting to run
reputation: name a client on AbuseIPDB's blacklist BlacklistEntry
The type was named Listed, in a package whose DNSBL verdicts carry a
field Listed and whose blocklists list clients too, so the name alone
did not say which list it was on.

Model: opus-5-5
2026-11-19 08:53:21 +00:00

25 lines
765 B
Go

package waf
import (
"time"
"sneak.berlin/go/smallwebwaf/internal/reputation"
)
// BesideLookupTimeLimit is besideLookupTimeLimit.
const BesideLookupTimeLimit = besideLookupTimeLimit
// SetBesideLookupTimeLimit gives the heuristics of besideLookup limit on s in
// place of besideLookupTimeLimit.
func (s *Server) SetBesideLookupTimeLimit(limit time.Duration) {
h := s.Handler.(*handler) //nolint:forcetypeassert // New makes it one
h.besideLookupLimit = limit
}
// BanAbuseIPDBBlacklist does on s what a fetch of AbuseIPDB's blacklist with
// the clients on listed does.
func (s *Server) BanAbuseIPDBBlacklist(listed []reputation.BlacklistEntry) {
h := s.Handler.(*handler) //nolint:forcetypeassert // New makes it one
h.banAbuseIPDBBlacklist(listed)
}