mirror of
https://github.com/tinyauthapp/tinyauth.git
synced 2026-08-26 15:23:32 +08:00
fix: rabbit comments
This commit is contained in:
@@ -112,11 +112,11 @@ func (v *DomainValidator) getURL(i string) (*url.URL, error) {
|
||||
}
|
||||
|
||||
func (v *DomainValidator) getHostname(hostname string) (string, error) {
|
||||
hostname = strings.ToLower(hostname)
|
||||
hostname = strings.TrimRight(hostname, ".")
|
||||
if net.ParseIP(hostname) != nil {
|
||||
return "", fmt.Errorf("ip addresses are not supported")
|
||||
}
|
||||
hostname = strings.ToLower(hostname)
|
||||
hostname = strings.TrimSuffix(hostname, ".")
|
||||
return hostname, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user