From 7ddf89a859a8ebd23defbe582eb635026cdba790 Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Tue, 3 Sep 2024 16:42:05 -0400 Subject: [PATCH] feature(config): add `server.ui.api.tls.skipverify` --- config.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/config.go b/config.go index c611e07..cf521a7 100644 --- a/config.go +++ b/config.go @@ -45,6 +45,9 @@ type Config struct { Key string `yaml:"key"` Port int `yaml:"port"` Protocol string `yaml:"protocol"` + TLS struct { + SkipVerify bool `yaml:"skipverify"` + } `yaml:"tls"` } `yaml:"api"` Host string `yaml:"host"` Password string `yaml:"password"` @@ -367,6 +370,19 @@ func init() { log.Fatal(err) } + // server.ui.api.tls.skipverify + uiCmd.PersistentFlags().Bool( + "server-ui-api-tls-skipverify", + false, + "Skip API server TLS certificate verification", + ) + if err := viper.BindPFlag( + "server.ui.api.tls.skipverify", + uiCmd.PersistentFlags().Lookup("server-ui-api-tls-skipverify"), + ); err != nil { + log.Fatal(err) + } + // server.ui.host uiCmd.PersistentFlags().String( "server-ui-host",