Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Allowlist ¶
Allowlist checks if host is in the allowed list. Each entry can be:
- a hostname: "gghstats.com"
- an IP: "192.168.1.1"
- a CIDR range: "10.0.0.0/8"
Empty allowlist = accept all.
func IgnoreIP ¶ added in v0.4.0
IgnoreIP returns true when ip should be excluded from stats (operator traffic).
func ReferrerSpam ¶ added in v0.4.0
ReferrerSpam reports known spam referrer hostnames.
Types ¶
type DatacenterBlocklist ¶ added in v0.4.0
type DatacenterBlocklist struct {
// contains filtered or unexported fields
}
DatacenterBlocklist matches cloud/hosting CIDR ranges.
func NewDatacenterBlocklist ¶ added in v0.4.0
func NewDatacenterBlocklist(extra []string) (*DatacenterBlocklist, error)
NewDatacenterBlocklist builds a blocklist from embedded defaults plus optional extra CIDR strings.
func (*DatacenterBlocklist) Contains ¶ added in v0.4.0
func (b *DatacenterBlocklist) Contains(ip string) bool
Contains reports whether ip falls in a blocked datacenter range.
Click to show internal directories.
Click to hide internal directories.