feat: 更新 API 主页路由及 FastAPI 配置
- 将主页路由从 "/home" 更新为根路径 "/",以简化访问。 - 在 FastAPI 实例中禁用文档和 OpenAPI 相关的 URL,提升 API 安全性。
This commit is contained in:
@@ -11,7 +11,7 @@ router = APIRouter(tags=["home"])
|
||||
_STATIC_DIR = Path(__file__).resolve().parent.parent / "static"
|
||||
|
||||
|
||||
@router.get("/home", response_class=HTMLResponse)
|
||||
@router.get("/", response_class=HTMLResponse)
|
||||
async def get_home():
|
||||
"""
|
||||
应用官网主页
|
||||
|
||||
Reference in New Issue
Block a user