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:
Evan
2024-10-29 08:40:24 +01:00
committed by GitHub
parent 51e779fab4
commit c2facc9958
+4 -2
View File
@@ -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,
}