go(settings): add domain fallback
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2023-08-04 17:19:06 +02:00
parent 1f8bbf7ec6
commit fb74533a96
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -321,7 +321,12 @@ func (s *Settings) SetSessionCookieEncrSecret(sessionCookieEncrSecret string) {
// SetHTTPDomain sets the httpDomain.
func (s *Settings) SetHTTPDomain(domain string) {
s.httpDomain = domain
switch domain {
case "":
s.httpDomain = "localhost"
default:
s.httpDomain = domain
}
}
// SetHTTPSecure sets the httpSecure.