* /control/set_upstreams_config: allow empty upstream list
This commit is contained in:
parent
4f4da3397c
commit
1b3122dd35
|
@ -146,11 +146,13 @@ func (s *Server) handleSetUpstreamConfig(w http.ResponseWriter, r *http.Request)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(req.Upstreams) != 0 {
|
||||||
err = ValidateUpstreams(req.Upstreams)
|
err = ValidateUpstreams(req.Upstreams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
httpError(r, w, http.StatusBadRequest, "wrong upstreams specification: %s", err)
|
httpError(r, w, http.StatusBadRequest, "wrong upstreams specification: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
newconf := FilteringConfig{}
|
newconf := FilteringConfig{}
|
||||||
newconf.UpstreamDNS = req.Upstreams
|
newconf.UpstreamDNS = req.Upstreams
|
||||||
|
|
Loading…
Reference in New Issue