mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
fix: enable TLS based on URL scheme for sync extension (#2747)
Signed-off-by: evanebb <78433178+evanebb@users.noreply.github.com>
This commit is contained in:
@@ -115,9 +115,11 @@ func (httpClient *Client) SetConfig(config Config) error {
|
||||
|
||||
httpClient.url = clientURL
|
||||
|
||||
// we want TLS enabled if the upstream registry URL is an HTTPS URL
|
||||
tlsEnabled := clientURL.Scheme == "https"
|
||||
|
||||
clientOpts := common.HTTPClientOptions{
|
||||
// we want TLS enabled when verifyTLS is true.
|
||||
TLSEnabled: config.TLSVerify,
|
||||
TLSEnabled: tlsEnabled,
|
||||
VerifyTLS: config.TLSVerify,
|
||||
Host: clientURL.Host,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user