Merge pull request #199 from flant/update-user-list-in-ha-mode
Fix update user list for kubernetes.secrets backend
This commit is contained in:
commit
f4d0212bfc
1 changed files with 9 additions and 0 deletions
9
main.go
9
main.go
|
@ -248,6 +248,15 @@ type clientStatus struct {
|
|||
|
||||
func (oAdmin *OvpnAdmin) userListHandler(w http.ResponseWriter, r *http.Request) {
|
||||
log.Info(r.RemoteAddr, " ", r.RequestURI)
|
||||
|
||||
if *storageBackend == "kubernetes.secrets" {
|
||||
err := app.updateIndexTxtOnDisk()
|
||||
if err != nil {
|
||||
log.Errorln(err)
|
||||
}
|
||||
oAdmin.clients = oAdmin.usersList()
|
||||
}
|
||||
|
||||
usersList, _ := json.Marshal(oAdmin.clients)
|
||||
fmt.Fprintf(w, "%s", usersList)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue