mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-23 05:25:35 +03:00
* /control/set_upstreams_config: allow empty upstream list
This commit is contained in:
parent
4f4da3397c
commit
1b3122dd35
1 changed files with 6 additions and 4 deletions
|
@ -146,10 +146,12 @@ func (s *Server) handleSetUpstreamConfig(w http.ResponseWriter, r *http.Request)
|
|||
return
|
||||
}
|
||||
|
||||
err = ValidateUpstreams(req.Upstreams)
|
||||
if err != nil {
|
||||
httpError(r, w, http.StatusBadRequest, "wrong upstreams specification: %s", err)
|
||||
return
|
||||
if len(req.Upstreams) != 0 {
|
||||
err = ValidateUpstreams(req.Upstreams)
|
||||
if err != nil {
|
||||
httpError(r, w, http.StatusBadRequest, "wrong upstreams specification: %s", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
newconf := FilteringConfig{}
|
||||
|
|
Loading…
Reference in a new issue