From 4dc483a303d5d4e147c807cd72963f1a3835cbbf Mon Sep 17 00:00:00 2001 From: Evil0ctal Date: Tue, 23 Apr 2024 09:53:00 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B:=20=E4=BF=AE=E5=A4=8D=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main.py | 7 +++++-- config.yaml | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 7a40e2f..da03f3a 100644 --- a/app/main.py +++ b/app/main.py @@ -119,13 +119,16 @@ description = f""" - If you need a more stable and feature-rich API service, you can use the paid API service: [TikHub API](https://beta.tikhub.io) """ +docs_url = config['API']['Docs_URL'] +redoc_url = config['API']['Redoc_URL'] + app = FastAPI( title="Douyin TikTok Download API", description=description, version=version, openapi_tags=tags_metadata, - docs_url='/docs', # 文档路径 - redoc_url='/redoc', # redoc文档路径 + docs_url=docs_url, # 文档路径 + redoc_url=redoc_url, # redoc文档路径 ) # API router diff --git a/config.yaml b/config.yaml index 138ec33..64caf3f 100644 --- a/config.yaml +++ b/config.yaml @@ -26,6 +26,8 @@ API: # Network Configuration Host_IP: 0.0.0.0 # use 127.0.0.1 for local access only | 仅本地访问请使用 Host_Port: 80 # default port is 80 | 默认端口为80 + Docs_URL: /docs # API documentation URL | API文档URL + Redoc_URL: /redoc # API documentation URL | API文档URL # API Information Version: V4.0.0 # API version | API版本