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 7ddf89a859 - Show all commits

View file

@ -45,6 +45,9 @@ type Config struct {
Key string `yaml:"key"` Key string `yaml:"key"`
Port int `yaml:"port"` Port int `yaml:"port"`
Protocol string `yaml:"protocol"` Protocol string `yaml:"protocol"`
TLS struct {
SkipVerify bool `yaml:"skipverify"`
} `yaml:"tls"`
} `yaml:"api"` } `yaml:"api"`
Host string `yaml:"host"` Host string `yaml:"host"`
Password string `yaml:"password"` Password string `yaml:"password"`
@ -367,6 +370,19 @@ func init() {
log.Fatal(err) 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 // server.ui.host
uiCmd.PersistentFlags().String( uiCmd.PersistentFlags().String(
"server-ui-host", "server-ui-host",