|
@@ -10,6 +10,7 @@ import (
|
|
"strings"
|
|
"strings"
|
|
|
|
|
|
"github.com/gorilla/mux"
|
|
"github.com/gorilla/mux"
|
|
|
|
+ "github.com/gravitl/netmaker/ee"
|
|
"github.com/gravitl/netmaker/logger"
|
|
"github.com/gravitl/netmaker/logger"
|
|
"github.com/gravitl/netmaker/logic"
|
|
"github.com/gravitl/netmaker/logic"
|
|
"github.com/gravitl/netmaker/models"
|
|
"github.com/gravitl/netmaker/models"
|
|
@@ -132,10 +133,13 @@ func getServerInfo(w http.ResponseWriter, r *http.Request) {
|
|
func getConfig(w http.ResponseWriter, r *http.Request) {
|
|
func getConfig(w http.ResponseWriter, r *http.Request) {
|
|
// Set header
|
|
// Set header
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.Header().Set("Content-Type", "application/json")
|
|
-
|
|
|
|
// get params
|
|
// get params
|
|
-
|
|
|
|
scfg := servercfg.GetServerConfig()
|
|
scfg := servercfg.GetServerConfig()
|
|
|
|
+ scfg.IsEE = "no"
|
|
|
|
+ if ee.IsEnterprise() {
|
|
|
|
+ scfg.IsEE = "yes"
|
|
|
|
+ }
|
|
|
|
+
|
|
json.NewEncoder(w).Encode(scfg)
|
|
json.NewEncoder(w).Encode(scfg)
|
|
//w.WriteHeader(http.StatusOK)
|
|
//w.WriteHeader(http.StatusOK)
|
|
}
|
|
}
|