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

@@ -1,6 +1,7 @@
package goedge
import (
"crypto/tls"
"encoding/json"
"fmt"
"net/http"
@@ -41,6 +42,11 @@ func (c *Client) WithTimeout(timeout time.Duration) *Client {
return c
}
func (c *Client) WithTLSConfig(config *tls.Config) *Client {
c.client.SetTLSClientConfig(config)
return c
}
func (c *Client) sendRequest(method string, path string, params interface{}) (*resty.Response, error) {
req := c.client.R().SetBasicAuth(c.accessKeyId, c.accessKey)
req.Method = method