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版本