mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
This reverts commit fc745670cf.
This commit is contained in:
@@ -51,8 +51,8 @@ func handleSysRaftJoinPost(core *vault.Core, w http.ResponseWriter, r *http.Requ
|
||||
return
|
||||
}
|
||||
|
||||
if req.ReadReplica && !readReplicasAllowed {
|
||||
respondError(w, http.StatusBadRequest, errors.New("read-replica nodes not allowed"))
|
||||
if req.NonVoter && !nonVotersAllowed {
|
||||
respondError(w, http.StatusBadRequest, errors.New("non-voting nodes not allowed"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ func handleSysRaftJoinPost(core *vault.Core, w http.ResponseWriter, r *http.Requ
|
||||
},
|
||||
}
|
||||
|
||||
joined, err := core.JoinRaftCluster(context.Background(), leaderInfos, req.ReadReplica)
|
||||
joined, err := core.JoinRaftCluster(context.Background(), leaderInfos, req.NonVoter)
|
||||
if err != nil {
|
||||
respondError(w, http.StatusInternalServerError, err)
|
||||
return
|
||||
@@ -109,5 +109,5 @@ type JoinRequest struct {
|
||||
LeaderClientKey string `json:"leader_client_key"`
|
||||
LeaderTLSServerName string `json:"leader_tls_servername"`
|
||||
Retry bool `json:"retry"`
|
||||
ReadReplica bool `json:"read_replica"`
|
||||
NonVoter bool `json:"non_voter"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user