fix: trim suffix dot from domain names

This commit is contained in:
Oleh Astappiev 2025-03-31 19:22:53 +02:00
parent c84831d4f4
commit dc9551a37c
No known key found for this signature in database
GPG key ID: 37D7AC22589E9632

View file

@ -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)
} }