fix: pass domain as protocol subdomain

This commit is contained in:
Derrick Hammer 2024-01-12 10:32:19 -05:00
parent 866fa89cee
commit 59a3ac6b64
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package protocols
import (
"crypto/ed25519"
"fmt"
s5config "git.lumeweb.com/LumeWeb/libs5-go/config"
s5ed "git.lumeweb.com/LumeWeb/libs5-go/ed25519"
s5interfaces "git.lumeweb.com/LumeWeb/libs5-go/interfaces"
@ -52,7 +53,7 @@ func (s *S5Protocol) Initialize(portal interfaces.Portal) error {
return err
}
cfg.HTTP.API.Domain = config.GetString("core.domain")
cfg.HTTP.API.Domain = fmt.Sprintf("s5.%s", config.GetString("core.domain"))
if config.IsSet("core.externalPort") {
cfg.HTTP.API.Port = config.GetUint("core.externalPort")