From 599f7e7c884089c725bf482095aa8c3554d9ef4b Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Sat, 29 Apr 2023 00:58:44 +0200 Subject: [PATCH] root: config: remove redundant default configs Signed-off-by: Marc 'risson' Schmitt --- authentik/lib/default.yml | 7 +++++++ internal/config/config.go | 25 +------------------------ 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/authentik/lib/default.yml b/authentik/lib/default.yml index 45ffb3073..b9aad30bd 100644 --- a/authentik/lib/default.yml +++ b/authentik/lib/default.yml @@ -11,7 +11,11 @@ postgresql: listen: listen_http: 0.0.0.0:9000 listen_https: 0.0.0.0:9443 + listen_ldap: 0.0.0.0:3389 + listen_ldaps: 0.0.0.0:6636 + listen_radius: 0.0.0.0:1812 listen_metrics: 0.0.0.0:9300 + listen_debug: 0.0.0.0:9900 trusted_proxy_cidrs: - 127.0.0.0/8 - 10.0.0.0/8 @@ -32,6 +36,9 @@ redis: cache_timeout_policies: 300 cache_timeout_reputation: 300 +paths: + media: ./media + debug: false remote_debug: false diff --git a/internal/config/config.go b/internal/config/config.go index 039904013..4a1013e4a 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -55,36 +55,13 @@ func getConfigPaths() []string { func Get() *Config { if cfg == nil { - c := defaultConfig() + c := &Config{} c.Setup(getConfigPaths()...) cfg = c } return cfg } -func defaultConfig() *Config { - return &Config{ - Debug: false, - Listen: ListenConfig{ - HTTP: "0.0.0.0:9000", - HTTPS: "0.0.0.0:9443", - LDAP: "0.0.0.0:3389", - LDAPS: "0.0.0.0:6636", - Radius: "0.0.0.0:1812", - Metrics: "0.0.0.0:9300", - Debug: "0.0.0.0:9900", - }, - Paths: PathsConfig{ - Media: "./media", - }, - LogLevel: "info", - ErrorReporting: ErrorReportingConfig{ - Enabled: false, - SampleRate: 1, - }, - } -} - func (c *Config) Setup(paths ...string) { for _, path := range paths { err := c.LoadConfig(path)