feat: add ipv6 support.

This commit is contained in:
EstrellaXD
2023-08-07 15:16:50 +08:00
parent 886ca93bca
commit 84d5dbaceb

View File

@@ -1,3 +1,4 @@
import os
import logging
import uvicorn
@@ -77,9 +78,13 @@ else:
if __name__ == "__main__":
if os.getenv("IPV6"):
host = "::"
else:
host = "0.0.0.0"
uvicorn.run(
app,
host="0.0.0.0",
host=host,
port=settings.program.webui_port,
log_config=uvicorn_logging_config,
)