mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
Validate DoH/DoH3 endpoint properly
When resolver type is doh/doh3, the endpoint must be a valid http url. Updates #149
This commit is contained in:
committed by
Cuong Manh Le
parent
f7d3db06c6
commit
7ce62ccaec
@@ -1383,6 +1383,8 @@ func fieldErrorMsg(fe validator.FieldError) string {
|
||||
return fmt.Sprintf("invalid IP format: %s", fe.Value())
|
||||
case "file":
|
||||
return fmt.Sprintf("filed does not exist: %s", fe.Value())
|
||||
case "http_url":
|
||||
return fmt.Sprintf("invalid http/https url: %s", fe.Value())
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user