feature(cmd): implémenter UI API TLS skip verify

This commit is contained in:
Victor Lacasse-Beaudoin 2024-09-03 16:43:22 -04:00
parent 2b6c631d64
commit 9072f7114a

10
cmd.go
View file

@ -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,