feat: add INSECURE_SKIP_VERIFY_ENABLED option (close #8)

This commit is contained in:
Pluto
2023-10-07 14:46:28 +08:00
parent b4b4acc288
commit dcb94bdedb
3 changed files with 11 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ package controller
import (
"bytes"
"context"
"crypto/tls"
"encoding/json"
"errors"
"fmt"
@@ -31,7 +32,13 @@ var httpClient *http.Client
var impatientHTTPClient *http.Client
func init() {
httpClient = &http.Client{}
httpClient = &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: common.InsecureSkipVerifyEnabled,
},
},
}
impatientHTTPClient = &http.Client{
Timeout: 5 * time.Second,
}