mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 11:31:11 -05:00
Centralize CORS configuration
Consolidate CORS handling by introducing a shared supabase/functions/_shared/cors.ts and migrate edge functions to import from it. Remove inline cors.ts usage across functions, standardize headers (including traceparent and x-request-id), and prepare for environment-aware origins.
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
import { serve } from "https://deno.land/std@0.190.0/http/server.ts";
|
||||
import { corsHeaders } from '../_shared/cors.ts';
|
||||
import { startRequest, endRequest, edgeLogger } from "../_shared/logger.ts";
|
||||
import { formatEdgeError } from "../_shared/errorFormatter.ts";
|
||||
|
||||
const corsHeaders = {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type, x-request-id',
|
||||
};
|
||||
|
||||
// Comprehensive list of disposable email domains
|
||||
const DISPOSABLE_DOMAINS = new Set([
|
||||
// Popular disposable email services
|
||||
|
||||
Reference in New Issue
Block a user