Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Fixing raft leaderAPI URL when URLPrefix nonempty #951

Merged
merged 2 commits into from
Aug 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion go/raft/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ func HttpGetLeader(path string) (response []byte, err error) {
}
leaderAPI := leaderURI
if config.Config.URLPrefix != "" {
leaderAPI = fmt.Sprintf("%s/%s", leaderAPI, config.Config.URLPrefix)
// We know URLPrefix begind with "/"
leaderAPI = fmt.Sprintf("%s%s", leaderAPI, config.Config.URLPrefix)
}
leaderAPI = fmt.Sprintf("%s/api", leaderAPI)

Expand Down