Spaces:
Sleeping
Sleeping
updated with cors
Browse files
app.py
CHANGED
|
@@ -11,12 +11,12 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
| 11 |
|
| 12 |
app = FastAPI()
|
| 13 |
|
| 14 |
-
# CORS Middleware
|
| 15 |
app.add_middleware(
|
| 16 |
CORSMiddleware,
|
| 17 |
-
allow_origins=["*"], # Allow all origins (
|
| 18 |
-
allow_methods=["*"],
|
| 19 |
-
allow_headers=["*"],
|
| 20 |
)
|
| 21 |
|
| 22 |
# ✅ Configure Gemini API
|
|
|
|
| 11 |
|
| 12 |
app = FastAPI()
|
| 13 |
|
| 14 |
+
# CORS Middleware Configuration
|
| 15 |
app.add_middleware(
|
| 16 |
CORSMiddleware,
|
| 17 |
+
allow_origins=["*"], # Allow all origins (Frontend to Backend Communication)
|
| 18 |
+
allow_methods=["*"], # Allow all HTTP methods (GET, POST, etc.)
|
| 19 |
+
allow_headers=["*"], # Allow all headers
|
| 20 |
)
|
| 21 |
|
| 22 |
# ✅ Configure Gemini API
|