fix: [CODE-760]: intenral mapping

This commit is contained in:
Abhinav Singh 2023-08-31 17:18:08 -07:00
parent 4147c691e6
commit 16d44f9ba4

View File

@ -40,9 +40,9 @@ func checkURL(rawURL string, allowLoopback bool, allowPrivateNetwork bool) error
// basic validation for loopback / private network addresses (only sanitary to give user an early error) // basic validation for loopback / private network addresses (only sanitary to give user an early error)
// IMPORTANT: during webook execution loopback / private network addresses are blocked (handles DNS resolution) // IMPORTANT: during webook execution loopback / private network addresses are blocked (handles DNS resolution)
// //
//if host == "localhost" { if host == "localhost" {
// return check.NewValidationError("localhost is not allowed.") return check.NewValidationError("localhost is not allowed.")
//} }
if ip := net.ParseIP(host); ip != nil { if ip := net.ParseIP(host); ip != nil {
if !allowLoopback && ip.IsLoopback() { if !allowLoopback && ip.IsLoopback() {