mirror of
https://github.com/usual2970/certimate.git
synced 2025-10-05 22:14:53 +00:00
feat: allow insecure connections on deployment to some self-hosted services
This commit is contained in:
2
internal/pkg/vendors/1panel-sdk/client.go
vendored
2
internal/pkg/vendors/1panel-sdk/client.go
vendored
@@ -35,7 +35,7 @@ func (c *Client) WithTimeout(timeout time.Duration) *Client {
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *Client) WithTlsConfig(config *tls.Config) *Client {
|
||||
func (c *Client) WithTLSConfig(config *tls.Config) *Client {
|
||||
c.client.SetTLSClientConfig(config)
|
||||
return c
|
||||
}
|
||||
|
6
internal/pkg/vendors/btpanel-sdk/client.go
vendored
6
internal/pkg/vendors/btpanel-sdk/client.go
vendored
@@ -2,6 +2,7 @@ package btpanelsdk
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"crypto/tls"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
@@ -34,6 +35,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) generateSignature(timestamp string) string {
|
||||
keyMd5 := md5.Sum([]byte(c.apiKey))
|
||||
keyMd5Hex := strings.ToLower(hex.EncodeToString(keyMd5[:]))
|
||||
|
6
internal/pkg/vendors/safeline-sdk/client.go
vendored
6
internal/pkg/vendors/safeline-sdk/client.go
vendored
@@ -1,6 +1,7 @@
|
||||
package safelinesdk
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
@@ -31,6 +32,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(path string, params interface{}) (*resty.Response, error) {
|
||||
url := c.apiHost + path
|
||||
req := c.client.R().
|
||||
|
Reference in New Issue
Block a user