From e352901621a547d0ab8baeef3afb0a36fe66838b Mon Sep 17 00:00:00 2001 From: Bipin B Narayan Date: Fri, 12 Jul 2024 21:05:59 +0530 Subject: [PATCH] Load public ip from env var if not present in config file --- config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index f0fd6e15..40e79a5e 100644 --- a/config/config.go +++ b/config/config.go @@ -136,7 +136,7 @@ func (c *Config) Prepare() error { ct.ListenAddress = "0.0.0.0:2121" } - if publicHost := os.Getenv("PUBLIC_HOST"); publicHost != "" { + if publicHost := os.Getenv("PUBLIC_HOST"); ct.PublicHost == "" && publicHost != "" { ct.PublicHost = publicHost }