mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05: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:
parent
51e779fab4
commit
c2facc9958
1 changed files with 4 additions and 2 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue