NET-1075: Endpoint detection server config (#2876)

* add config for endpoint detection

* add config to netmaker env file

* fix config value check for endpoint detection
This commit is contained in:
Abhishek K
2024-04-03 23:51:09 +05:30
committed by GitHub
parent 80e775d5b4
commit dccb6b5da7
8 changed files with 61 additions and 43 deletions

View File

@@ -134,17 +134,18 @@ func pull(w http.ResponseWriter, r *http.Request) {
serverConf.TrafficKey = key
response := models.HostPull{
Host: *host,
Nodes: logic.GetHostNodes(host),
ServerConfig: serverConf,
Peers: hPU.Peers,
PeerIDs: hPU.PeerIDs,
HostNetworkInfo: hPU.HostNetworkInfo,
EgressRoutes: hPU.EgressRoutes,
FwUpdate: hPU.FwUpdate,
ChangeDefaultGw: hPU.ChangeDefaultGw,
DefaultGwIp: hPU.DefaultGwIp,
IsInternetGw: hPU.IsInternetGw,
Host: *host,
Nodes: logic.GetHostNodes(host),
ServerConfig: serverConf,
Peers: hPU.Peers,
PeerIDs: hPU.PeerIDs,
HostNetworkInfo: hPU.HostNetworkInfo,
EgressRoutes: hPU.EgressRoutes,
FwUpdate: hPU.FwUpdate,
ChangeDefaultGw: hPU.ChangeDefaultGw,
DefaultGwIp: hPU.DefaultGwIp,
IsInternetGw: hPU.IsInternetGw,
EndpointDetection: servercfg.IsEndpointDetectionEnabled(),
}
logger.Log(1, hostID, "completed a pull")