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