mirror of
https://github.com/m13253/dns-over-https.git
synced 2024-09-21 15:57:11 +00:00
Update google.go
Make "cd" check case-insensitive.
This commit is contained in:
parent
4d742bd15e
commit
ef2c6bbdc8
@ -71,9 +71,9 @@ func (s *Server) parseRequestGoogle(w http.ResponseWriter, r *http.Request) *DNS
|
||||
|
||||
cdStr := r.FormValue("cd")
|
||||
cd := false
|
||||
if cdStr == "1" || strings.ToUpper(cdStr) == "TRUE" {
|
||||
if cdStr == "1" || strings.EqualFold(cdStr, "true") {
|
||||
cd = true
|
||||
} else if cdStr == "0" || strings.ToUpper(cdStr) == "FALSE" || cdStr == "" {
|
||||
} else if cdStr == "0" || strings.EqualFold(cdStr, "false") || cdStr == "" {
|
||||
} else {
|
||||
return &DNSRequest{
|
||||
errcode: 400,
|
||||
|
Loading…
Reference in New Issue
Block a user