mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
interpret local ips as localhost
This commit is contained in:
parent
133b91b9f0
commit
6653b55416
@ -71,6 +71,10 @@ func LookupHostname(addr net.Addr) string {
|
||||
if err != nil {
|
||||
return addrStr
|
||||
}
|
||||
switch ipaddr {
|
||||
case "127.0.0.1", "::1":
|
||||
return "localhost"
|
||||
}
|
||||
names, err := net.LookupHost(ipaddr)
|
||||
if err != nil {
|
||||
return ipaddr
|
||||
|
Loading…
Reference in New Issue
Block a user