Spaces:
Running
Running
Update backend/server.py
Browse files- backend/server.py +5 -8
backend/server.py
CHANGED
|
@@ -22,19 +22,16 @@ try:
|
|
| 22 |
except Exception as e:
|
| 23 |
print(f"❌ Erreur connexion Supabase : {e}")
|
| 24 |
|
| 25 |
-
# --- CONFIGURATION SERVEUR
|
| 26 |
-
#
|
| 27 |
sio = socketio.AsyncServer(
|
| 28 |
async_mode='asgi',
|
| 29 |
-
cors_allowed_origins=
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
"*"
|
| 33 |
-
]
|
| 34 |
)
|
| 35 |
|
| 36 |
app = FastAPI()
|
| 37 |
-
# Middleware pour autoriser les requêtes API REST classiques
|
| 38 |
app.add_middleware(
|
| 39 |
CORSMiddleware,
|
| 40 |
allow_origins=["*"],
|
|
|
|
| 22 |
except Exception as e:
|
| 23 |
print(f"❌ Erreur connexion Supabase : {e}")
|
| 24 |
|
| 25 |
+
# --- CONFIGURATION SERVEUR AVEC LOGS DÉTAILLÉS ---
|
| 26 |
+
# On active logger=True et engineio_logger=True pour voir les détails de l'erreur
|
| 27 |
sio = socketio.AsyncServer(
|
| 28 |
async_mode='asgi',
|
| 29 |
+
cors_allowed_origins='*', # On remet l'étoile simple (String), c'est souvent plus stable
|
| 30 |
+
logger=True, # <--- AJOUT IMPORTANT
|
| 31 |
+
engineio_logger=True # <--- AJOUT IMPORTANT
|
|
|
|
|
|
|
| 32 |
)
|
| 33 |
|
| 34 |
app = FastAPI()
|
|
|
|
| 35 |
app.add_middleware(
|
| 36 |
CORSMiddleware,
|
| 37 |
allow_origins=["*"],
|