broadfield-dev commited on
Commit
aa61a83
·
verified ·
1 Parent(s): 1a2b36a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,10 +7,10 @@ import os
7
  app = Flask(__name__)
8
  app.config['SECRET_KEY'] = 'your-secret-key' # Replace with a secure key
9
 
10
- # Configure SocketIO with CORS for all origins and eventlet for Hugging Face compatibility
11
  socketio = SocketIO(app,
12
- cors_allowed_origins="*", # Allow all origins (or specify "https://your-space.hf.space" for security)
13
- async_mode='eventlet') # Use eventlet for WebSocket support on Hugging Face
14
 
15
  # Store game instances per client session
16
  games = {}
 
7
  app = Flask(__name__)
8
  app.config['SECRET_KEY'] = 'your-secret-key' # Replace with a secure key
9
 
10
+ # Configure SocketIO with CORS for all origins and threading mode
11
  socketio = SocketIO(app,
12
+ cors_allowed_origins="*", # Allow all origins (or specify "https://broadfield-dev-dungeon-game.hf.space" for security)
13
+ async_mode='threading') # Use threading instead of eventlet
14
 
15
  # Store game instances per client session
16
  games = {}