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