This commit is contained in:
src committed 2026-09-28 11:33:52 +03:00
1 parent d340d1b2ad
commit 7ccd84cd96
101 files changed
+2070 -344

No files matched your search

+3
View File
@@ -191,6 +191,7 @@ func NewClient(serverURL string, skipCertificateChecks bool) (*Client, error) {
if !ok {
return nil, fmt.Errorf("clone http.DefaultTransport: got %T, want *http.Transport", http.DefaultTransport)
}
transport := defaultTransport.Clone()
tlsConfig := &tls.Config{}
if transport.TLSClientConfig != nil {
@@ -208,6 +209,7 @@ func NewClientWithConfig(cfg *core.Configuration) *Client {
if cfg == nil {
cfg = NewConfiguration()
}
cfg.ServerURL = strings.TrimSuffix(cfg.ServerURL, "/")
if !strings.HasSuffix(cfg.ServerURL, "/api/v1") {
cfg.ServerURL += "/api/v1"
@@ -215,6 +217,7 @@ func NewClientWithConfig(cfg *core.Configuration) *Client {
if cfg.HTTPClient == nil {
cfg.HTTPClient = http.DefaultClient
}
client := &Client{cfg: cfg}
client.DeAPISIX = de_apisix.NewAPIClient(cfg).DeAPISIX
client.DeAudits = de_audits.NewAPIClient(cfg).DeAudits