Fix 127.0.0.1 bug in isHostIntranet()

This commit is contained in:
Yang Luo
2023-10-13 23:29:37 +08:00
parent 69b144d80f
commit 43d849086f
2 changed files with 6 additions and 1 deletions

View File

@ -190,5 +190,5 @@ func isHostIntranet(s string) bool {
return false
}
return ip.IsPrivate()
return ip.IsPrivate() || ip.IsLoopback() || ip.IsLinkLocalUnicast() || ip.IsLinkLocalMulticast()
}