From b6a35088cab72f3c0b605a08c14130f7b3a61fea Mon Sep 17 00:00:00 2001 From: Mikkel RINGAUD Date: Sat, 12 Aug 2023 04:10:14 +0200 Subject: [PATCH] fix(upload-file): add method for CORS --- supabase/functions/upload-file/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/supabase/functions/upload-file/index.ts b/supabase/functions/upload-file/index.ts index 1a94f1d..1a4b11d 100644 --- a/supabase/functions/upload-file/index.ts +++ b/supabase/functions/upload-file/index.ts @@ -6,7 +6,8 @@ import { supabase, getUserProfile } from "../_shared/supabase.ts"; const corsHeaders = { 'Access-Control-Allow-Origin': '*', - 'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey', + 'Access-Control-Allow-Methods': 'PUT', + 'Access-Control-Allow-Headers': 'authorization, x-client-info', } const json = (data: T, options?: { status: number }) => new Response(