internal: call GetStore on application to improve logging

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-10-12 13:33:20 +02:00
parent cc69311ec0
commit 22a7c25526
2 changed files with 4 additions and 5 deletions

View File

@ -73,11 +73,11 @@ func NewApplication(p api.ProxyOutpostConfig, c *http.Client, cs *ak.CryptoStore
endpint: endpoint,
oauthConfig: oauth2Config,
tokenVerifier: verifier,
sessions: GetStore(p),
proxyConfig: p,
httpClient: c,
mux: mux,
}
a.sessions = a.getStore(p)
muxLogger := log.WithField("logger", "authentik.outpost.proxyv2.application").WithField("name", p.Name)
mux.Use(web.NewLoggingHandler(muxLogger, func(l *log.Entry, r *http.Request) *log.Entry {
s, err := a.sessions.Get(r, constants.SeesionName)