mirror of
https://git.hackfreedom.org/mesh.cat/meshname.git
synced 2026-05-22 06:22:32 +00:00
make validation case-insensitive
This commit is contained in:
@@ -105,11 +105,11 @@ func (s *MeshnameServer) handleMeshnameRequest(w dns.ResponseWriter, r *dns.Msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// process domain
|
// process domain
|
||||||
input := strings.TrimSuffix(q.Name, ".")
|
input := strings.ToLower(strings.TrimSuffix(q.Name, "."))
|
||||||
subDomain := ""
|
subDomain := ""
|
||||||
tld := ""
|
tld := ""
|
||||||
for i := range tldList {
|
for i := range tldList {
|
||||||
t := tldList[i]
|
t := strings.ToLower(tldList[i])
|
||||||
if strings.HasSuffix(input, "."+t) {
|
if strings.HasSuffix(input, "."+t) {
|
||||||
// define tld
|
// define tld
|
||||||
tld = t
|
tld = t
|
||||||
|
|||||||
Reference in New Issue
Block a user