Update app.py
Browse files
app.py
CHANGED
@@ -10,22 +10,10 @@ from io import BytesIO
|
|
10 |
import random
|
11 |
import logging
|
12 |
|
13 |
-
|
14 |
-
class IgnoreIPFilter(logging.Filter):
|
15 |
-
def filter(self, record):
|
16 |
-
# List of IPs you want to ignore in logs
|
17 |
-
ignored_ips = ['10.24.22.209']
|
18 |
-
if any(ip in record.getMessage() for ip in ignored_ips):
|
19 |
-
return False
|
20 |
-
return True
|
21 |
# Configure the logging level
|
22 |
logging.getLogger('eventlet.wsgi.server').setLevel(logging.ERROR)
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
app = Flask(__name__)
|
27 |
-
app.logger.addFilter(IgnoreIPFilter())
|
28 |
-
|
29 |
app.config['SECRET_KEY'] = 'your_secret_key'
|
30 |
socketio = SocketIO(app, async_mode='eventlet')
|
31 |
|
@@ -167,4 +155,4 @@ def reset_quiz():
|
|
167 |
participant["score"] = 0
|
168 |
|
169 |
if __name__ == '__main__':
|
170 |
-
socketio.run(app, host='0.0.0.0', port=7860, debug=
|
|
|
10 |
import random
|
11 |
import logging
|
12 |
|
13 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
# Configure the logging level
|
15 |
logging.getLogger('eventlet.wsgi.server').setLevel(logging.ERROR)
|
|
|
|
|
|
|
16 |
app = Flask(__name__)
|
|
|
|
|
17 |
app.config['SECRET_KEY'] = 'your_secret_key'
|
18 |
socketio = SocketIO(app, async_mode='eventlet')
|
19 |
|
|
|
155 |
participant["score"] = 0
|
156 |
|
157 |
if __name__ == '__main__':
|
158 |
+
socketio.run(app, host='0.0.0.0', port=7860, debug=False)
|