Skip to content

Commit

Permalink
fix: add RLS enforcement indicator to the context.
Browse files Browse the repository at this point in the history
Duty uses it to handling caching of resource selectors
  • Loading branch information
adityathebe authored and moshloop committed Jan 15, 2025
1 parent e3df2bb commit 14edc8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions echo/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 14edc8f

Please sign in to comment.