Prathamesh Bhamare commited on
Commit ·
a85ec8d
1
Parent(s): f6c73c2
fix: point frontend to hugging face api and relax backend CORS
Browse files- api/main.py +3 -3
- frontend/desktop.html +1 -1
- 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 |
-
"
|
| 189 |
).split(",")
|
| 190 |
|
| 191 |
app.add_middleware(
|
| 192 |
CORSMiddleware,
|
| 193 |
-
allow_origins=[
|
| 194 |
-
allow_credentials=
|
| 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 = '
|
| 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 = '
|
| 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); }
|