mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 09:57:01 +00:00
This commit is contained in:
@@ -1012,6 +1012,10 @@ var GetDomain = func(hostport string) string {
|
||||
// loopback.
|
||||
return "localhost"
|
||||
default:
|
||||
if net.ParseIP(host) != nil { // if it's an IP, see #1945.
|
||||
return host
|
||||
}
|
||||
|
||||
if domain, err := publicsuffix.EffectiveTLDPlusOne(host); err == nil {
|
||||
host = domain
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user