persee-tech commited on
Commit
9ea6511
·
verified ·
1 Parent(s): fc8319f

Update backend/server.py

Browse files
Files changed (1) hide show
  1. backend/server.py +8 -1
backend/server.py CHANGED
@@ -24,7 +24,14 @@ except Exception as e:
24
 
25
  # --- CONFIGURATION SERVEUR & SÉCURITÉ (CORS) ---
26
  # C'EST ICI LA CORRECTION CRITIQUE (LIGNE 25) :
27
- sio = socketio.AsyncServer(async_mode='asgi', cors_allowed_origins='*')
 
 
 
 
 
 
 
28
 
29
  app = FastAPI()
30
  # Middleware pour autoriser les requêtes API REST classiques
 
24
 
25
  # --- CONFIGURATION SERVEUR & SÉCURITÉ (CORS) ---
26
  # C'EST ICI LA CORRECTION CRITIQUE (LIGNE 25) :
27
+ sio = socketio.AsyncServer(
28
+ async_mode='asgi',
29
+ cors_allowed_origins=[
30
+ "https://startech-final.vercel.app",
31
+ "http://localhost:3000",
32
+ "*"
33
+ ]
34
+ )
35
 
36
  app = FastAPI()
37
  # Middleware pour autoriser les requêtes API REST classiques