Skip to content

Commit

Permalink
fix(upload-file): add method for CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexcited committed Aug 12, 2023
1 parent f4d1e22 commit b6a3508
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion supabase/functions/upload-file/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <T>(data: T, options?: { status: number }) => new Response(
Expand Down

0 comments on commit b6a3508

Please sign in to comment.