mirror of https://github.com/D4-project/d4-core
fix: [Flask server] change default host
parent
168c31a5bf
commit
7ce265e477
server
configs
|
@ -10,6 +10,7 @@ analyzer_queues_max_size = 10000
|
|||
|
||||
[Flask_Server]
|
||||
# UI port number
|
||||
host = 127.0.0.1
|
||||
port = 7000
|
||||
|
||||
[Redis_STREAM]
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue