Merge pull request 'fix: considérer cfg.Server.API.Host' (#60) from vlbeaudoin/fix/api-check-host into main

Reviewed-on: #60
This commit is contained in:
Victor Lacasse-Beaudoin 2024-07-23 11:45:52 -04:00
commit 61c4ef80f5

4
cmd.go
View file

@ -125,7 +125,7 @@ var apiCmd = &cobra.Command{
case false:
e.Logger.Fatal(
e.Start(
fmt.Sprintf(":%d", cfg.Server.API.Port),
fmt.Sprintf("%s:%d", cfg.Server.API.Host, cfg.Server.API.Port),
),
)
case true:
@ -139,7 +139,7 @@ var apiCmd = &cobra.Command{
e.Logger.Fatal(
e.StartTLS(
fmt.Sprintf(":%d", cfg.Server.API.Port),
fmt.Sprintf("%s:%d", cfg.Server.API.Host, cfg.Server.API.Port),
cfg.Server.API.TLS.Certfile,
cfg.Server.API.TLS.Keyfile,
),