mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 12:11:17 -05:00
Fix security vulnerabilities
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { serve } from "https://deno.land/std@0.190.0/http/server.ts";
|
||||
import { createClient } from "https://esm.sh/@supabase/supabase-js@2.57.4";
|
||||
import { validateEntityData, validateEntityDataStrict } from "./validation.ts";
|
||||
import { createErrorResponse } from "../_shared/errorSanitizer.ts";
|
||||
|
||||
const corsHeaders = {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
@@ -437,9 +438,11 @@ serve(async (req) => {
|
||||
);
|
||||
} catch (error) {
|
||||
console.error('Error in process-selective-approval:', error);
|
||||
return new Response(
|
||||
JSON.stringify({ error: error instanceof Error ? error.message : 'Unknown error' }),
|
||||
{ status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
|
||||
return createErrorResponse(
|
||||
error,
|
||||
500,
|
||||
corsHeaders,
|
||||
'process-selective-approval'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user