Prathamesh Bhamare commited on
Commit
a85ec8d
·
1 Parent(s): f6c73c2

fix: point frontend to hugging face api and relax backend CORS

Browse files
Files changed (3) hide show
  1. api/main.py +3 -3
  2. frontend/desktop.html +1 -1
  3. frontend/mobile.html +1 -1
api/main.py CHANGED
@@ -185,13 +185,13 @@ import os
185
 
186
  _cors_origins = os.getenv(
187
  "CORS_ORIGINS",
188
- "http://localhost:3000,http://localhost:8501,http://localhost:5173,http://localhost:8080,http://localhost:8000,null",
189
  ).split(",")
190
 
191
  app.add_middleware(
192
  CORSMiddleware,
193
- allow_origins=[o.strip() for o in _cors_origins],
194
- allow_credentials=True,
195
  allow_methods=["*"],
196
  allow_headers=["*"],
197
  )
 
185
 
186
  _cors_origins = os.getenv(
187
  "CORS_ORIGINS",
188
+ "*",
189
  ).split(",")
190
 
191
  app.add_middleware(
192
  CORSMiddleware,
193
+ allow_origins=["*"],
194
+ allow_credentials=False,
195
  allow_methods=["*"],
196
  allow_headers=["*"],
197
  )
frontend/desktop.html CHANGED
@@ -312,7 +312,7 @@
312
  // KRONECTOR Frontend — API Integration
313
  // ============================================================================
314
 
315
- const API_BASE = 'http://localhost:8000';
316
 
317
  // --- Utility ---
318
  function $(id) { return document.getElementById(id); }
 
312
  // KRONECTOR Frontend — API Integration
313
  // ============================================================================
314
 
315
+ const API_BASE = 'https://prats010-kronector.hf.space';
316
 
317
  // --- Utility ---
318
  function $(id) { return document.getElementById(id); }
frontend/mobile.html CHANGED
@@ -347,7 +347,7 @@
347
  // KRONECTOR Mobile — API Integration
348
  // ============================================================================
349
 
350
- const API_BASE = 'http://localhost:8000';
351
 
352
  // --- Utility ---
353
  function $(id) { return document.getElementById(id); }
 
347
  // KRONECTOR Mobile — API Integration
348
  // ============================================================================
349
 
350
+ const API_BASE = 'https://prats010-kronector.hf.space';
351
 
352
  // --- Utility ---
353
  function $(id) { return document.getElementById(id); }