Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 支持双栈访问 #2114

Open
wants to merge 1 commit into
base: frontier
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions shared_utils/fastapi_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ async def middleware(request: Request, call_next):
# --- --- uvicorn.Config --- ---
ssl_keyfile = None if SSL_KEYFILE == "" else SSL_KEYFILE
ssl_certfile = None if SSL_CERTFILE == "" else SSL_CERTFILE
server_name = "0.0.0.0"
server_name = None
config = uvicorn.Config(
fastapi_app,
host=server_name,
Expand All @@ -286,7 +286,7 @@ async def middleware(request: Request, call_next):
ssl_certfile=ssl_certfile,
)
server = Server(config)
url_host_name = "localhost" if server_name == "0.0.0.0" else server_name
url_host_name = "localhost" if server_name is None else server_name
if ssl_keyfile is not None:
if ssl_certfile is None:
raise ValueError(
Expand Down