fix: for FTP server driver allow implicit trust of TLS (#17541)

fixes #17535
This commit is contained in:
Harshavardhana
2023-06-30 08:04:13 -07:00
committed by GitHub
parent 9d628346eb
commit 7f782983ca
6 changed files with 12 additions and 12 deletions

View File

@@ -664,14 +664,14 @@ func newCustomDialContext() dialContext {
// NewRemoteTargetHTTPTransport returns a new http configuration
// used while communicating with the remote replication targets.
func NewRemoteTargetHTTPTransport() func() *http.Transport {
func NewRemoteTargetHTTPTransport(insecure bool) func() *http.Transport {
return xhttp.ConnSettings{
DialContext: newCustomDialContext(),
DNSCache: globalDNSCache,
RootCAs: globalRootCAs,
TCPOptions: globalTCPOptions,
EnableHTTP2: false,
}.NewRemoteTargetHTTPTransport()
}.NewRemoteTargetHTTPTransport(insecure)
}
// Load the json (typically from disk file).