CORS + Auth Header Error: Supabase Edge Function fro Lovable Frontend

Hey everyone, I'm connecting my Supabase Edge Function to Lovable (a no-code frontend). The function returns 200 OK inside Supabase, but my frontend hits CORS preflight errors (400/500) and shows "Missing authorization header" inside the console. It looks like my CORS or authentication configuration might not be handling the Lovable domain correctly. What's the best way to validate or adjust that setup so my frontend can fetch data from the question table? Looking for guidance on validating CORS configuration and auth headers so Lovable can fetch from 'public.questions'. Any help appreciated!
1 Reply
garyaustin
garyaustin3h ago
Not sure if that is an error you are generating in your function code or you are not suppling an Authorization header with "bearer JWT" if you have JWT validation turned on for the edge function. What does "inside Supabase" mean? Probably need to show the code getting the error and your Edge function settings. Also as you mention Lovable are you using your own Supabase instance or their Cloud database (which although Supabase has different setting options available).

Did you find this page helpful?