privateuserh commited on
Commit
68e864d
·
verified ·
1 Parent(s): 1c17053

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +0 -18
index.html CHANGED
@@ -1070,24 +1070,6 @@
1070
  async fetch(request, env, ctx) {
1071
  const url = new URL(request.url);
1072
 
1073
- // This is where you define the CORS headers
1074
- const corsHeaders = {
1075
- // THIS LINE IS CRITICAL:
1076
- // Replace 'https://YOUR_HUGGING_FACE_SPACE_URL' with the actual, exact URL of your Hugging Face Space.
1077
- // Example: 'https://huggingface.co/spaces/myusername/century-city-remic'
1078
- 'Access-Control-Allow-Origin': 'https://huggingface.co/spaces/privateuserh/ccremic-vbeta1-06',
1079
- 'Access-Control-Allow-Methods': 'POST, OPTIONS', // Crucial for POST requests
1080
- 'Access-Control-Allow-Headers': 'Content-Type', // Crucial if sending JSON (Content-Type header)
1081
- };
1082
-
1083
- // Handle CORS preflight requests (OPTIONS method)
1084
- if (request.method === 'OPTIONS') {
1085
- return new Response(null, {
1086
- status: 204, // No content, just send headers
1087
- headers: corsHeaders,
1088
- });
1089
- }
1090
-
1091
  // Handle POST request to /submit-offer
1092
  if (request.method === 'POST' && url.pathname === '/submit-offer') {
1093
  try {
 
1070
  async fetch(request, env, ctx) {
1071
  const url = new URL(request.url);
1072
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1073
  // Handle POST request to /submit-offer
1074
  if (request.method === 'POST' && url.pathname === '/submit-offer') {
1075
  try {