make validation case-insensitive
This commit is contained in:
parent
5b4fd41ffa
commit
17a8ed4414
@ -105,11 +105,11 @@ func (s *MeshnameServer) handleMeshnameRequest(w dns.ResponseWriter, r *dns.Msg)
|
||||
}
|
||||
|
||||
// process domain
|
||||
input := strings.TrimSuffix(q.Name, ".")
|
||||
input := strings.ToLower(strings.TrimSuffix(q.Name, "."))
|
||||
subDomain := ""
|
||||
tld := ""
|
||||
for i := range tldList {
|
||||
t := tldList[i]
|
||||
t := strings.ToLower(tldList[i])
|
||||
if strings.HasSuffix(input, "."+t) {
|
||||
// define tld
|
||||
tld = t
|
||||
|
Loading…
Reference in New Issue
Block a user