From 599e2d2424b3fb2f5752ad57e7aef0496fe61783 Mon Sep 17 00:00:00 2001 From: Francesco Ilario Date: Wed, 25 Sep 2024 11:33:56 +0200 Subject: [PATCH] add comment Signed-off-by: Francesco Ilario --- pkg/proxy/proxy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 7ada33d4..9d0713c7 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -683,6 +683,7 @@ func (p *Proxy) newReverseProxy(ctx echo.Context, target *access.ClusterAccess, req := ctx.Request() targetQuery := target.APIURL().RawQuery username, _ := ctx.Get(context.UsernameKey).(string) + // set username in context for logging purposes ctx.Set(context.ImpersonateUser, target.Username()) director := func(req *http.Request) {