feature: ajouter cfg.Server.UI.Host et implémenter UI TLS

This commit is contained in:
Victor Lacasse-Beaudoin 2024-07-23 11:46:37 -04:00
parent 61c4ef80f5
commit f5aa25a12a
2 changed files with 36 additions and 2 deletions

View file

@ -46,6 +46,7 @@ type Config struct {
Port int `yaml:"port"`
Protocol string `yaml:"protocol"`
} `yaml:"api"`
Host string `yaml:"host"`
Password string `yaml:"password"`
Port int `yaml:"port"`
TLS struct {
@ -366,6 +367,19 @@ func init() {
log.Fatal(err)
}
// server.ui.host
uiCmd.PersistentFlags().String(
"server-ui-host",
"",
"Web UI host",
)
if err := viper.BindPFlag(
"server.ui.host",
uiCmd.PersistentFlags().Lookup("server-ui-host"),
); err != nil {
log.Fatal(err)
}
// server.ui.password
uiCmd.PersistentFlags().String(
"server-ui-password",