fix: vérifier existence de certfile et keyfile pour API
Au lieu de print leur valeur à l'écran
This commit is contained in:
parent
537f1a8a1a
commit
03c9ad5f3c
1 changed files with 7 additions and 2 deletions
9
cmd.go
9
cmd.go
|
@ -129,8 +129,13 @@ var apiCmd = &cobra.Command{
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
case true:
|
case true:
|
||||||
//TODO
|
if cfg.Server.API.TLS.Certfile == "" {
|
||||||
log.Printf("dbg: certfile='%s' keyfile='%s'", cfg.Server.API.TLS.Certfile, cfg.Server.API.TLS.Keyfile)
|
log.Fatal("TLS enabled for API but no certificate file provided")
|
||||||
|
}
|
||||||
|
|
||||||
|
if cfg.Server.API.TLS.Keyfile == "" {
|
||||||
|
log.Fatal("TLS enabled for UI but no private key file provided")
|
||||||
|
}
|
||||||
|
|
||||||
e.Logger.Fatal(
|
e.Logger.Fatal(
|
||||||
e.StartTLS(
|
e.StartTLS(
|
||||||
|
|
Loading…
Reference in a new issue