mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-19 07:07:42 +01:00
Disable CA download when hosted via HTTP
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
This commit is contained in:
parent
f85870511d
commit
6c3df3c8ce
@ -171,6 +171,7 @@ func (sia *SystemInfoAPI) GetGeneralInfo() {
|
||||
registryURL = l[0]
|
||||
}
|
||||
_, caStatErr := os.Stat(defaultRootCert)
|
||||
enableCADownload := caStatErr == nil && strings.HasPrefix(extURL, "https://")
|
||||
harborVersion := sia.getVersion()
|
||||
info := GeneralInfo{
|
||||
AdmiralEndpoint: utils.SafeCastString(cfg[common.AdmiralEndpoint]),
|
||||
@ -182,7 +183,7 @@ func (sia *SystemInfoAPI) GetGeneralInfo() {
|
||||
SelfRegistration: utils.SafeCastBool(cfg[common.SelfRegistration]),
|
||||
ExtURL: extURL,
|
||||
RegistryURL: registryURL,
|
||||
HasCARoot: caStatErr == nil,
|
||||
HasCARoot: enableCADownload,
|
||||
HarborVersion: harborVersion,
|
||||
RegistryStorageProviderName: utils.SafeCastString(cfg[common.RegistryStorageProviderName]),
|
||||
ReadOnly: config.ReadOnly(),
|
||||
|
Loading…
Reference in New Issue
Block a user