diff --git a/internal/outpost/proxyv2/application/application.go b/internal/outpost/proxyv2/application/application.go index cb9e9b0de..4c6402253 100644 --- a/internal/outpost/proxyv2/application/application.go +++ b/internal/outpost/proxyv2/application/application.go @@ -113,9 +113,9 @@ func NewApplication(p api.ProxyOutpostConfig, c *http.Client, cs *ak.CryptoStore return l } if c.PreferredUsername != "" { - return l.WithField("request_username", c.PreferredUsername) + return l.WithField("user", c.PreferredUsername) } - return l.WithField("request_username", c.Sub) + return l.WithField("user", c.Sub) })) mux.Use(func(inner http.Handler) http.Handler { return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { diff --git a/internal/outpost/proxyv2/application/mode_proxy.go b/internal/outpost/proxyv2/application/mode_proxy.go index 79ad0ad5a..0d687b657 100644 --- a/internal/outpost/proxyv2/application/mode_proxy.go +++ b/internal/outpost/proxyv2/application/mode_proxy.go @@ -27,11 +27,14 @@ func (a *Application) configureProxy() error { if err != nil { return err } - rp := &httputil.ReverseProxy{Director: a.proxyModifyRequest(u)} rsp := sentry.StartSpan(context.TODO(), "authentik.outposts.proxy.application_transport") - rp.Transport = web.NewTracingTransport(rsp.Context(), a.getUpstreamTransport()) - rp.ErrorHandler = a.newProxyErrorHandler() - rp.ModifyResponse = a.proxyModifyResponse + rp := &httputil.ReverseProxy{ + Director: a.proxyModifyRequest(u), + Transport: web.NewTracingTransport(rsp.Context(), a.getUpstreamTransport()), + ErrorHandler: a.newProxyErrorHandler(), + ModifyResponse: a.proxyModifyResponse, + FlushInterval: -1, + } a.mux.PathPrefix("/").HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { defer func() { err := recover()