File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Supabase Configuration
22SUPABASE_URL = https://your-project.supabase.co
3- SUPABASE_SERVICE_KEY = your-service -key
3+ SUPABASE_ANON_KEY = your-anon -key
44
55# Startup Mode
66# Set ALLOW_DEGRADED_STARTUP=1 to allow backend startup even if duplicate/RAG models fail to load
Original file line number Diff line number Diff line change 3535env_path = Path (__file__ ).parent / '.env'
3636load_dotenv (dotenv_path = env_path )
3737
38- # Initialize Supabase Client (Service Role for backend bypass )
38+ # Initialize Supabase Client (Anon Key to respect RLS )
3939try :
4040 from supabase import create_client , Client
4141 url = os .environ .get ("SUPABASE_URL" )
42- key = os .environ .get ("SUPABASE_SERVICE_KEY " )
42+ key = os .environ .get ("SUPABASE_ANON_KEY " )
4343 if not url or not key :
44- print ("[ERROR] SUPABASE_URL or SUPABASE_SERVICE_KEY not set in backend/.env" )
44+ print ("[ERROR] SUPABASE_URL or SUPABASE_ANON_KEY not set in backend/.env" )
4545 supabase = None
4646 else :
4747 supabase = create_client (url , key )
You can’t perform that action at this time.
0 commit comments