mirror of
https://github.com/tinyauthapp/tinyauth.git
synced 2026-09-23 02:53:31 +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) {
|
func (v *DomainValidator) getHostname(hostname string) (string, error) {
|
||||||
|
hostname = strings.ToLower(hostname)
|
||||||
|
hostname = strings.TrimRight(hostname, ".")
|
||||||
if net.ParseIP(hostname) != nil {
|
if net.ParseIP(hostname) != nil {
|
||||||
return "", fmt.Errorf("ip addresses are not supported")
|
return "", fmt.Errorf("ip addresses are not supported")
|
||||||
}
|
}
|
||||||
hostname = strings.ToLower(hostname)
|
|
||||||
hostname = strings.TrimSuffix(hostname, ".")
|
|
||||||
return hostname, nil
|
return hostname, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user