internal: centralise config for listeners to use same config system everywhere (#3367)

* centralise config for listeners to use same config system everywhere

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

#3360

* add docs

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens L
2022-08-03 21:33:27 +02:00
committed by GitHub
parent 9a9c826c0b
commit 2ce8e18bab
15 changed files with 60 additions and 58 deletions

View File

@ -4,6 +4,7 @@ import (
"net/http"
log "github.com/sirupsen/logrus"
"goauthentik.io/internal/config"
"goauthentik.io/internal/utils/sentry"
"github.com/gorilla/mux"
@ -31,7 +32,7 @@ func RunServer() {
rw.WriteHeader(204)
})
m.Path("/metrics").Handler(promhttp.Handler())
listen := "0.0.0.0:9300"
listen := config.Get().Listen.Metrics
l.WithField("listen", listen).Info("Starting Metrics server")
err := http.ListenAndServe(listen, m)
if err != nil {