fix: bind HTTP API to localhost by default and expose --host

This commit is contained in:
2026-03-01 13:13:22 +08:00
parent 1c1b870d2b
commit 7397d6795b
2 changed files with 18 additions and 16 deletions

View File

@@ -301,7 +301,7 @@ def metrics_dashboard():
}), 500
def start_http_server(host='0.0.0.0', port=6060, debug=False):
def start_http_server(host='127.0.0.1', port=6060, debug=False):
"""启动 HTTP 服务器"""
global task_manager, task_scheduler
@@ -330,4 +330,4 @@ if __name__ == '__main__':
format='[%(asctime)s] %(levelname)s: %(message)s'
)
start_http_server(port=6060, debug=True)
start_http_server(host='127.0.0.1', port=6060, debug=True)