remove corednsAddrr from token

This commit is contained in:
Matthew R. Kasun 2022-02-15 11:25:50 -05:00
parent 5e3654faa9
commit 7e9f65ad1b
4 changed files with 4 additions and 5 deletions

View file

@ -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,

View file

@ -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"`

View file

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

View file

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