mirror of
https://github.com/minio/minio.git
synced 2025-01-23 04:33:15 -05:00
Use loadCachedConfigs appropriately to load ENVs (#7187)
This commit is contained in:
parent
6f08edfb36
commit
ea6d61ab1f
@ -282,7 +282,7 @@ func (s *serverConfig) loadFromEnvs() {
|
||||
if jwksURL, ok := os.LookupEnv("MINIO_IAM_JWKS_URL"); ok {
|
||||
if u, err := xnet.ParseURL(jwksURL); err == nil {
|
||||
s.OpenID.JWKS.URL = u
|
||||
s.OpenID.JWKS.PopulatePublicKey()
|
||||
logger.FatalIf(s.OpenID.JWKS.PopulatePublicKey(), "Unable to populate public key from JWKS URL")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,6 +203,9 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
|
||||
// Override any values from ENVs.
|
||||
srvCfg.loadFromEnvs()
|
||||
|
||||
// Load values to cached global values.
|
||||
srvCfg.loadToCachedConfigs()
|
||||
|
||||
// hold the mutex lock before a new config is assigned.
|
||||
globalServerConfigMu.Lock()
|
||||
globalServerConfig = srvCfg
|
||||
|
Loading…
x
Reference in New Issue
Block a user