mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02: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:
@@ -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