mirror of
https://github.com/pgsty/minio.git
synced 2026-07-24 22:46:16 +03:00
ssl: Set a global boolean to enable SSL across Minio (#3558)
We have been using `isSSL()` everywhere we can set a global value once and re-use it again.
This commit is contained in:
@@ -90,6 +90,9 @@ var (
|
||||
// CA root certificates, a nil value means system certs pool will be used
|
||||
globalRootCAs *x509.CertPool
|
||||
|
||||
// IsSSL indicates if the server is configured with SSL.
|
||||
globalIsSSL bool
|
||||
|
||||
// List of admin peers.
|
||||
globalAdminPeers = adminPeers{}
|
||||
|
||||
@@ -124,4 +127,7 @@ func setGlobalsFromContext(c *cli.Context) {
|
||||
}
|
||||
// Set global quiet flag.
|
||||
globalQuiet = c.Bool("quiet") || c.GlobalBool("quiet")
|
||||
|
||||
// Is TLS configured?.
|
||||
globalIsSSL = isSSL()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user