Merge pull request 'fix: vérifier existence de certfile et keyfile pour API' (#59) from vlbeaudoin/fix/check-api-cert-and-key into main

Reviewed-on: #59
This commit is contained in:
Victor Lacasse-Beaudoin 2024-07-23 11:41:47 -04:00
commit 31bcdbac20

9
cmd.go
View file

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