refactor: try to use core.externalPort if set, else use core.port

This commit is contained in:
Derrick Hammer 2024-01-12 09:17:53 -05:00
parent fecc99b081
commit 2caaa07da8
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 1 deletions

View File

@ -51,7 +51,12 @@ func (s *S5Protocol) Initialize(portal interfaces.Portal) error {
} }
cfg.HTTP.API.Domain = config.GetString("core.domain") cfg.HTTP.API.Domain = config.GetString("core.domain")
cfg.HTTP.API.Port = config.GetUint("core.port")
if config.IsSet("core.externalPort") {
cfg.HTTP.API.Port = config.GetUint("core.externalPort")
} else {
cfg.HTTP.API.Port = config.GetUint("core.port")
}
dbPath := pconfig.GetString("dbPath") dbPath := pconfig.GetString("dbPath")
if dbPath == "" { if dbPath == "" {