feature(cmd): implémenter UI API TLS skip verify
This commit is contained in:
parent
2b6c631d64
commit
9072f7114a
1 changed files with 9 additions and 1 deletions
10
cmd.go
10
cmd.go
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"context"
|
||||
"crypto/subtle"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"log"
|
||||
|
@ -181,8 +182,15 @@ var uiCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
// API Client
|
||||
var httpClient = &http.Client{
|
||||
Transport: &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
InsecureSkipVerify: cfg.Server.UI.API.TLS.SkipVerify,
|
||||
},
|
||||
},
|
||||
}
|
||||
apiClient := APIClient{voki.New(
|
||||
http.DefaultClient,
|
||||
httpClient,
|
||||
cfg.Server.UI.API.Host,
|
||||
cfg.Server.UI.API.Key,
|
||||
cfg.Server.UI.API.Port,
|
||||
|
|
Reference in a new issue