feat: add ipv6 support.

This commit is contained in:
EstrellaXD
2023-08-28 22:14:18 +08:00
parent 766bcb13a2
commit 58cd4796e5

View File

@@ -1,3 +1,5 @@
import os
import logging
import uvicorn
@@ -21,9 +23,10 @@ uvicorn_logging_config = {
}
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,
)