Allow specifying the dashboard bind address (#2787)

This commit is contained in:
Jesse Hills
2021-11-25 07:59:32 +13:00
committed by GitHub
parent 15cd602e8b
commit 7e8012c1a0
2 changed files with 10 additions and 3 deletions
+4 -3
View File
@@ -970,16 +970,17 @@ def start_web_server(args):
server.add_socket(socket)
else:
_LOGGER.info(
"Starting dashboard web server on http://0.0.0.0:%s and configuration dir %s...",
"Starting dashboard web server on http://%s:%s and configuration dir %s...",
args.address,
args.port,
settings.config_dir,
)
app.listen(args.port)
app.listen(args.port, args.address)
if args.open_ui:
import webbrowser
webbrowser.open(f"localhost:{args.port}")
webbrowser.open(f"http://{args.address}:{args.port}")
if settings.status_use_ping:
status_thread = PingStatusThread()