outposts/proxy: make logging fields more consistent
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
b4963bec76
commit
e917e756cc
|
@ -94,14 +94,14 @@ func NewApplication(p api.ProxyOutpostConfig, c *http.Client, cs *ak.CryptoStore
|
||||||
if !ok {
|
if !ok {
|
||||||
return l
|
return l
|
||||||
}
|
}
|
||||||
return l.WithField("request_username", c.Email)
|
return l.WithField("request_username", c.PreferredUsername)
|
||||||
}))
|
}))
|
||||||
mux.Use(func(inner http.Handler) http.Handler {
|
mux.Use(func(inner http.Handler) http.Handler {
|
||||||
return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
|
return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
|
||||||
c, _ := a.getClaims(r)
|
c, _ := a.getClaims(r)
|
||||||
user := ""
|
user := ""
|
||||||
if c != nil {
|
if c != nil {
|
||||||
user = c.Email
|
user = c.PreferredUsername
|
||||||
}
|
}
|
||||||
before := time.Now()
|
before := time.Now()
|
||||||
inner.ServeHTTP(rw, r)
|
inner.ServeHTTP(rw, r)
|
||||||
|
|
Reference in New Issue