From 58cd4796e51a7d60e45ef553f138974f95071575 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Mon, 28 Aug 2023 22:14:18 +0800 Subject: [PATCH] feat: add ipv6 support. --- backend/src/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/main.py b/backend/src/main.py index c0229948d..3ccd26490 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -1,3 +1,5 @@ +import os + import logging import uvicorn @@ -21,9 +23,10 @@ } if __name__ == "__main__": + host = "::" if os.getenv("IPV6") else "0.0.0.0" uvicorn.run( router, - host="0.0.0.0", + host=host, port=settings.program.webui_port, log_config=uvicorn_logging_config, )