mirror of
https://github.com/projectdiscovery/httpx
synced 2026-06-08 16:50:17 +00:00
16 lines
284 B
Go
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)))
|
|
}
|