Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
11 |
socketio = SocketIO(app,
|
12 |
-
cors_allowed_origins="*", # Allow all origins (or specify "https://
|
13 |
-
async_mode='
|
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 = {}
|