outposts: use common config loader for outposts to support loading values from file

closes #4383

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2023-01-08 14:19:08 +01:00
parent 47aba4a996
commit 7eb6320d74
4 changed files with 23 additions and 14 deletions

View File

@ -3,8 +3,6 @@ package debug
import (
"net/http"
"net/http/pprof"
"os"
"strings"
log "github.com/sirupsen/logrus"
"goauthentik.io/internal/config"
@ -12,7 +10,7 @@ import (
func EnableDebugServer() {
l := log.WithField("logger", "authentik.go_debugger")
if deb := os.Getenv("AUTHENTIK_DEBUG"); strings.ToLower(deb) != "true" {
if !config.Get().Debug {
l.Info("not enabling debug server, set `AUTHENTIK_DEBUG` to `true` to enable it.")
return
}