diff --git a/supabase/functions/create-checkout/index.ts b/supabase/functions/create-checkout/index.ts index 787e1d4..e1b06da 100644 --- a/supabase/functions/create-checkout/index.ts +++ b/supabase/functions/create-checkout/index.ts @@ -1,7 +1,12 @@ -import { corsHeaders } from "npm:@supabase/supabase-js@2/cors"; import { z } from "npm:zod@3.23.8"; import { type StripeEnv, createStripeClient } from "../_shared/stripe.ts"; +const corsHeaders = { + "Access-Control-Allow-Origin": "*", + "Access-Control-Allow-Headers": "authorization, x-client-info, apikey, content-type", + "Access-Control-Allow-Methods": "POST, OPTIONS", +}; + const PRICE_PER_KG_ORE = 32500; // 325 kr in öre const WEEKS_PER_MONTH = 4;