From b73c0cba2237a1024e23d487fde04440a3b25986 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Mon, 5 Oct 2020 08:19:09 -0700 Subject: [PATCH] split host port --- src/utils/utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/utils.go b/src/utils/utils.go index e226b9b..ba1f7cd 100644 --- a/src/utils/utils.go +++ b/src/utils/utils.go @@ -278,6 +278,9 @@ var PrivateIPNetworks = []net.IPNet{ } func IsLocalIP(ipaddress string) bool { + if strings.Contains("localhost") { + return true + } host, _, _ := net.SplitHostPort(ipaddress) ip := net.ParseIP(host) for _, ipNet := range PrivateIPNetworks {