mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-06 21:24:16 +08:00
remove corednsAddrr from token
This commit is contained in:
parent
5e3654faa9
commit
7e9f65ad1b
4 changed files with 4 additions and 5 deletions
|
@ -52,7 +52,6 @@ func CreateAccessKey(accesskey models.AccessKey, network models.Network) (models
|
|||
var accessToken models.AccessToken
|
||||
s := servercfg.GetServerConfig()
|
||||
servervals := models.ServerConfig{
|
||||
CoreDNSAddr: s.CoreDNSAddr,
|
||||
GRPCConnString: s.GRPCConnString,
|
||||
GRPCSSL: s.GRPCSSL,
|
||||
CheckinInterval: s.CheckinInterval,
|
||||
|
|
|
@ -12,7 +12,6 @@ type ClientConfig struct {
|
|||
}
|
||||
|
||||
type ServerConfig struct {
|
||||
CoreDNSAddr string `json:"corednsaddr"`
|
||||
GRPCConnString string `json:"grpcconn"`
|
||||
GRPCSSL string `json:"grpcssl"`
|
||||
CheckinInterval string `json:"checkininterval"`
|
||||
|
|
|
@ -184,7 +184,6 @@ func GetCLIConfig(c *cli.Context) (ClientConfig, string, error) {
|
|||
cfg.Node.LocalRange = accesstoken.ClientConfig.LocalRange
|
||||
cfg.Server.GRPCSSL = accesstoken.ServerConfig.GRPCSSL
|
||||
cfg.Server.CheckinInterval = accesstoken.ServerConfig.CheckinInterval
|
||||
cfg.Server.CoreDNSAddr = accesstoken.ServerConfig.CoreDNSAddr
|
||||
if c.String("grpcserver") != "" {
|
||||
cfg.Server.GRPCAddress = c.String("grpcserver")
|
||||
}
|
||||
|
|
|
@ -207,6 +207,8 @@ func GetGRPCConnString() string {
|
|||
conn = os.Getenv("SERVER_GRPC_CONN_STRING")
|
||||
} else if config.Config.Server.GRPCConnString != "" {
|
||||
conn = config.Config.Server.GRPCConnString
|
||||
} else {
|
||||
conn = config.Config.Server.GRPCHost + ":" + config.Config.Server.GRPCPort
|
||||
}
|
||||
return conn
|
||||
}
|
||||
|
@ -414,8 +416,8 @@ func IsGRPCSSL() bool {
|
|||
if os.Getenv("GRPC_SSL") == "on" {
|
||||
isssl = true
|
||||
}
|
||||
} else if config.Config.Server.DNSMode != "" {
|
||||
if config.Config.Server.DNSMode == "on" {
|
||||
} else if config.Config.Server.GRPCSSL != "" {
|
||||
if config.Config.Server.GRPCSSL == "on" {
|
||||
isssl = true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue