mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-25 22:45:46 +03:00
[change] control: add upstreams validation before dns config test
This commit is contained in:
parent
bc4c2e2ff7
commit
ac131923a2
1 changed files with 4 additions and 0 deletions
|
@ -418,6 +418,10 @@ func handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func checkDNS(input string, bootstrap []string) error {
|
||||
if err := validateUpstream(input); err != nil {
|
||||
return fmt.Errorf("wrong upstream format: %s", err)
|
||||
}
|
||||
|
||||
if len(bootstrap) == 0 {
|
||||
bootstrap = defaultBootstrap
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue