Skip to content

Commit

Permalink
fix: enable TLS based on URL scheme for sync extension
Browse files Browse the repository at this point in the history
  • Loading branch information
evanebb committed Oct 26, 2024
1 parent 51e779f commit 653b420
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/extensions/sync/httpclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down

0 comments on commit 653b420

Please sign in to comment.