feat: allow insecure connections in cdnfly, goedge, powerdns

This commit is contained in:
Fu Diwei
2025-05-09 16:35:58 +08:00
parent 5abdb577fb
commit 26359b9d16
25 changed files with 147 additions and 86 deletions

View File

@@ -82,7 +82,7 @@ func (d *DeployerProvider) Deploy(ctx context.Context, certPEM string, privkeyPE
return &deployer.DeployResult{}, nil
}
func createSdkClient(apiUrl, apiKey string, allowInsecure bool) (*btsdk.Client, error) {
func createSdkClient(apiUrl, apiKey string, skipTlsVerify bool) (*btsdk.Client, error) {
if _, err := url.Parse(apiUrl); err != nil {
return nil, errors.New("invalid baota api url")
}
@@ -92,7 +92,7 @@ func createSdkClient(apiUrl, apiKey string, allowInsecure bool) (*btsdk.Client,
}
client := btsdk.NewClient(apiUrl, apiKey)
if allowInsecure {
if skipTlsVerify {
client.WithTLSConfig(&tls.Config{InsecureSkipVerify: true})
}