From 289f228915a9a0fb9d9e6f0fe93e32afc29fd4f7 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Mon, 5 Oct 2020 08:20:11 -0700 Subject: [PATCH] split host port --- src/utils/utils.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/utils.go b/src/utils/utils.go index ba1f7cd4..70e20acb 100644 --- a/src/utils/utils.go +++ b/src/utils/utils.go @@ -278,7 +278,10 @@ var PrivateIPNetworks = []net.IPNet{ } func IsLocalIP(ipaddress string) bool { - if strings.Contains("localhost") { + if strings.Contains(ipaddress, "localhost") { + return true + } + if strings.Contains(ipaddress, "fe80") { return true } host, _, _ := net.SplitHostPort(ipaddress)