@@ -28,7 +28,6 @@ import (
28
28
"github.com/gorilla/mux"
29
29
"github.com/signal18/replication-manager/cluster"
30
30
"github.com/signal18/replication-manager/regtest"
31
- v3 "github.com/swaggest/swgui/v3"
32
31
)
33
32
34
33
//RSA KEYS AND INITIALISATION
@@ -109,7 +108,7 @@ func (repman *ReplicationManager) apiserver() {
109
108
router .PathPrefix ("/static/" ).Handler (http .FileServer (http .Dir (repman .Conf .HttpRoot )))
110
109
router .PathPrefix ("/app/" ).Handler (http .FileServer (http .Dir (repman .Conf .HttpRoot )))
111
110
router .HandleFunc ("/api/login" , repman .loginHandler )
112
- router .Handle ("/api" , v3 .NewHandler ("My API" , "/swagger.json" , "/api" ))
111
+ // router.Handle("/api", v3.NewHandler("My API", "/swagger.json", "/api"))
113
112
114
113
router .Handle ("/api/clusters" , negroni .New (
115
114
negroni .Wrap (http .HandlerFunc (repman .handlerMuxClusters )),
@@ -152,6 +151,11 @@ func (repman *ReplicationManager) apiserver() {
152
151
tlsConfig := Repmanv3TLS {
153
152
Enabled : false ,
154
153
}
154
+ // Add default unsecure cert if not set
155
+ if repman .Conf .MonitoringSSLCert == "" {
156
+ repman .Conf .MonitoringSSLCert = repman .Conf .ShareDir + "/server.crt"
157
+ repman .Conf .MonitoringSSLKey = repman .Conf .ShareDir + "/server.key"
158
+ }
155
159
156
160
if repman .Conf .MonitoringSSLCert != "" {
157
161
tlsConfig = Repmanv3TLS {
0 commit comments