diff --git a/internal/concierge/impersonator/impersonator.go b/internal/concierge/impersonator/impersonator.go index 6e5ef6cc..a95dc770 100644 --- a/internal/concierge/impersonator/impersonator.go +++ b/internal/concierge/impersonator/impersonator.go @@ -270,6 +270,7 @@ func newImpersonationReverseProxyFunc(restConfig *rest.Config) (func(*genericapi } plog.Debug("impersonation proxy servicing request", "method", r.Method, "url", r.URL.String()) + defer plog.Debug("impersonation proxy finished servicing request", "method", r.Method, "url", r.URL.String()) plog.Trace("impersonation proxy servicing request was for user", "method", r.Method, "url", r.URL.String(), "username", userInfo.GetName(), // this info leak seems fine for trace level logs ) @@ -278,8 +279,6 @@ func newImpersonationReverseProxyFunc(restConfig *rest.Config) (func(*genericapi reverseProxy.Transport = rt reverseProxy.FlushInterval = 200 * time.Millisecond // the "watch" verb will not work without this line reverseProxy.ServeHTTP(w, r) - - plog.Debug("impersonation proxy finished servicing request", "method", r.Method, "url", r.URL.String()) }) }, nil }