mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-15 19:31:45 +03:00
[change] control: add upstreams validation before dns config test
This commit is contained in:
parent
bc4c2e2ff7
commit
ac131923a2
@ -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 New Issue
Block a user