fix: trim suffix dot from domain names
This commit is contained in:
parent
c84831d4f4
commit
dc9551a37c
1 changed files with 3 additions and 0 deletions
|
|
@ -89,6 +89,9 @@ func parseDomainFromHost(host string) string {
|
||||||
if strings.Contains(host, ":") {
|
if strings.Contains(host, ":") {
|
||||||
host = strings.Split(host, ":")[0]
|
host = strings.Split(host, ":")[0]
|
||||||
}
|
}
|
||||||
|
if strings.HasSuffix(host, ".") {
|
||||||
|
host = strings.TrimSuffix(host, ".")
|
||||||
|
}
|
||||||
return strings.ToLower(host)
|
return strings.ToLower(host)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue