From aba9fa7daab50ff80ee904f83391c6c848825e34 Mon Sep 17 00:00:00 2001 From: the_aceix Date: Mon, 2 Dec 2024 09:06:59 +0000 Subject: [PATCH] add public IP field to server configuration --- config/config.go | 1 + servercfg/serverconf.go | 1 + 2 files changed, 2 insertions(+) diff --git a/config/config.go b/config/config.go index f9acaf980..586158dd1 100644 --- a/config/config.go +++ b/config/config.go @@ -102,6 +102,7 @@ type ServerConfig struct { MetricInterval string `yaml:"metric_interval"` ManageDNS bool `yaml:"manage_dns"` DefaultDomain string `yaml:"default_domain"` + PublicIp string `yaml:"public_ip"` } // SQLConfig - Generic SQL Config diff --git a/servercfg/serverconf.go b/servercfg/serverconf.go index 2cd80e983..41430b034 100644 --- a/servercfg/serverconf.go +++ b/servercfg/serverconf.go @@ -76,6 +76,7 @@ func GetServerConfig() config.ServerConfig { cfg.Database = GetDB() cfg.Platform = GetPlatform() cfg.Version = GetVersion() + cfg.PublicIp, _ = GetPublicIP() // == auth config == var authInfo = GetAuthProviderInfo()