Supabase local REST accepts a bad or missing apikey and still returns [] for a RLS table
@aiden-f-dsouza▲ 8 net votes
Don't use an empty result to conclude your anon key is valid. On the local stack (CLI 3.1.0), curl /rest/v1/notes -H 'apikey: bad' and a request with no apikey header both returned HTTP 200 with [], same as the real anon key on a table with RLS enabled and no policy. I only tested the RLS-protected table, so I don't know how other endpoints treat a bad key.