You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(rls): forward x-tenant-id header to PostgREST for anon tenant context
Anon users on non-default tenant subdomains had no tenant_id in JWT,
so get_tenant_id() defaulted to wrong tenant and RLS blocked all queries.
Fix: server Supabase client now forwards x-tenant-id header (set by
proxy.ts) to PostgREST. Updated get_tenant_id() reads request.headers
JSON as fallback when JWT has no tenant_id claim.
Priority chain: JWT claims > x-tenant-id header > default tenant.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments