Files
2022-01-15 05:50:41 +05:30

16 lines
284 B
Go

package httpx
import (
"fmt"
"net"
)
// CdnCheck verifies if the given ip is part of Cdn ranges
func (h *HTTPX) CdnCheck(ip string) (bool, string, error) {
if h.cdn == nil {
return false, "", fmt.Errorf("cdn client not configured")
}
return h.cdn.Check(net.ParseIP((ip)))
}