// server/supabase/functions/_shared/cors.ts // Edge Function 공통 CORS 헤더 export const corsHeaders: Record = { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type', 'Access-Control-Allow-Methods': 'GET, POST, PATCH, DELETE, OPTIONS' } export function handleCorsPreflightRequest(req: Request): Response | null { if (req.method === 'OPTIONS') { return new Response('ok', { headers: corsHeaders }) } return null }