React/Vite/shadcn-ui site for Gigafibre ISP. Address qualification via PostgreSQL (5.2M AQ addresses, pg_trgm fuzzy search). No Supabase dependency for address search. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
11 lines
375 B
SQL
11 lines
375 B
SQL
|
|
-- Remove the permissive public INSERT policy
|
|
DROP POLICY IF EXISTS "Anyone can insert search logs" ON public.search_logs;
|
|
|
|
-- Add a restrictive policy that blocks anonymous/authenticated inserts
|
|
-- The edge function uses service_role which bypasses RLS entirely
|
|
CREATE POLICY "Block direct inserts on search logs"
|
|
ON public.search_logs
|
|
FOR INSERT
|
|
WITH CHECK (false);
|