mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 13:51:12 -05:00
Connect to Lovable Cloud
Improve CORS handling and error logging to fix moderation edge cases: - Add x-idempotency-key to allowed CORS headers and expose explicit POST methods - Extend CORS headers to include Access-Control-Allow-Methods - Update edge function tracing and client error handling to better detect and log CORS/network issues - Enhance error handling utilities to surface CORS-related failures and provide clearer user messages
This commit is contained in:
@@ -9,6 +9,7 @@ const STANDARD_HEADERS = [
|
||||
'x-client-info',
|
||||
'apikey',
|
||||
'content-type',
|
||||
'x-idempotency-key',
|
||||
];
|
||||
|
||||
// Tracing headers for distributed tracing and request tracking
|
||||
@@ -36,6 +37,7 @@ export const corsHeaders = {
|
||||
export const corsHeadersWithTracing = {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Headers': ALL_HEADERS.join(', '),
|
||||
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user