mirror of
https://github.com/status-im/consul.git
synced 2025-02-16 15:47:21 +00:00
Allow _all for WAN as a no-op.
This commit is contained in:
parent
f282273b54
commit
67b19ac065
@ -157,11 +157,18 @@ func (s *HTTPServer) AgentMembers(resp http.ResponseWriter, req *http.Request) (
|
||||
}
|
||||
|
||||
segment := req.URL.Query().Get("segment")
|
||||
if wan && segment != "" {
|
||||
if wan {
|
||||
switch segment {
|
||||
case "", api.AllSegments:
|
||||
// The zero value and the special "give me all members"
|
||||
// key are ok, otherwise the argument doesn't apply to
|
||||
// the WAN.
|
||||
default:
|
||||
resp.WriteHeader(http.StatusBadRequest)
|
||||
fmt.Fprint(resp, "Cannot provide a segment with wan=true")
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
|
||||
var members []serf.Member
|
||||
if wan {
|
||||
|
Loading…
x
Reference in New Issue
Block a user