From 14edc8fe8160882ecc1b00a14d618ace0fc18c93 Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Wed, 15 Jan 2025 17:20:35 +0545 Subject: [PATCH] fix: add RLS enforcement indicator to the context. Duty uses it to handling caching of resource selectors --- echo/serve.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/echo/serve.go b/echo/serve.go index b6054698..1b57b5d7 100644 --- a/echo/serve.go +++ b/echo/serve.go @@ -340,6 +340,9 @@ func RLSMiddleware(next echov4.HandlerFunc) echov4.HandlerFunc { return err } + // We attach this value to indicate that RLS is enforced. + txCtx = txCtx.WithValue("rls-enabled", "true") + // set the context with the tx c.SetRequest(c.Request().WithContext(txCtx))