fix: [Flask server] change default host

pull/49/head
Terrtia 2020-09-04 09:22:14 +02:00
parent 168c31a5bf
commit 7ce265e477
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
2 changed files with 7 additions and 1 deletions

View File

@ -10,6 +10,7 @@ analyzer_queues_max_size = 10000
[Flask_Server]
# UI port number
host = 127.0.0.1
port = 7000
[Redis_STREAM]

View File

@ -64,6 +64,11 @@ server_mode = config_loader.get_config_str("D4_Server", "server_mode")
if server_mode not in all_server_modes:
print('Error: incorrect server_mode')
try:
FLASK_HOST = config_loader.get_config_int("Flask_Server", "host")
except Exception as e:
FLASK_HOST = '127.0.0.1'
try:
FLASK_PORT = config_loader.get_config_int("Flask_Server", "port")
except Exception:
@ -1137,4 +1142,4 @@ def get_uuid_stats_history_json():
if __name__ == "__main__":
app.run(host='0.0.0.0', port=FLASK_PORT, threaded=True, ssl_context=ssl_context)
app.run(host='FLASK_HOST', port=FLASK_PORT, threaded=True, ssl_context=ssl_context)