Browse Source

fix: add CORS Allow-Methods header for DELETE in custom-content-delete

Add Access-Control-Allow-Methods header to allow DELETE requests
from the frontend. Previously missing this header caused CORS
preflight failures in production.

Error fixed:
- Method DELETE is not allowed by Access-Control-Allow-Methods
  in preflight response

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fszontagh 4 months ago
parent
commit
b6e7e1ca42
1 changed files with 1 additions and 0 deletions
  1. 1 0
      supabase/functions/custom-content-delete/index.ts

+ 1 - 0
supabase/functions/custom-content-delete/index.ts

@@ -17,6 +17,7 @@ import { deleteCustomContent } from '../_shared/qdrant-client.ts';
 const corsHeaders = {
   'Access-Control-Allow-Origin': '*',
   'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type',
+  'Access-Control-Allow-Methods': 'DELETE, OPTIONS',
 };
 
 Deno.serve(async (req) => {