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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/subtle"
|
"crypto/subtle"
|
||||||
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"log"
|
"log"
|
||||||
|
@ -181,8 +182,15 @@ var uiCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
// API Client
|
// API Client
|
||||||
|
var httpClient = &http.Client{
|
||||||
|
Transport: &http.Transport{
|
||||||
|
TLSClientConfig: &tls.Config{
|
||||||
|
InsecureSkipVerify: cfg.Server.UI.API.TLS.SkipVerify,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
apiClient := APIClient{voki.New(
|
apiClient := APIClient{voki.New(
|
||||||
http.DefaultClient,
|
httpClient,
|
||||||
cfg.Server.UI.API.Host,
|
cfg.Server.UI.API.Host,
|
||||||
cfg.Server.UI.API.Key,
|
cfg.Server.UI.API.Key,
|
||||||
cfg.Server.UI.API.Port,
|
cfg.Server.UI.API.Port,
|
||||||
|
|
Loading…
Reference in a new issue