mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-21 21:15:13 +00:00
Fix CLI openapi url in production environment (#785)
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ def run(host: str, port: int, reload: bool, workers: int | None) -> None:
|
||||
url = f'http://{host}:{port}'
|
||||
docs_url = url + settings.FASTAPI_DOCS_URL
|
||||
redoc_url = url + settings.FASTAPI_REDOC_URL
|
||||
openapi_url = url + settings.FASTAPI_OPENAPI_URL
|
||||
openapi_url = url + (settings.FASTAPI_OPENAPI_URL or '')
|
||||
|
||||
panel_content = Text()
|
||||
panel_content.append(f'📝 Swagger 文档: {docs_url}\n', style='blue')
|
||||
|
||||
Reference in New Issue
Block a user