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