1
0
Fork 0
mirror of synced 2024-11-22 08:45:35 -05:00

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:
vitaliy-sn 2023-04-27 16:04:00 +03:00 committed by GitHub
commit f4d0212bfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}