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

Merged
vlbeaudoin merged 3 commits from vlbeaudoin/feature/ui-allow-selfsigned-api-tls into main 2024-09-03 16:44:19 -04:00 AGit
Showing only changes of commit 9072f7114a - Show all commits

10
cmd.go
View file

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