From 731b6319d0a1d209553f90232fa528e6b83d488c Mon Sep 17 00:00:00 2001 From: Lan Date: Sun, 16 Feb 2025 22:25:14 +0800 Subject: [PATCH] feat: new adaptation root path configuration --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 3c24274..5de22da 100644 --- a/main.py +++ b/main.py @@ -95,8 +95,9 @@ app.include_router(share_api) app.include_router(admin_api) +@app.exception_handler(404) @app.get("/") -async def index(): +async def index(request=None, exc=None): return HTMLResponse( content=open( BASE_DIR / f"{settings.themesSelect}/index.html", "r", encoding="utf-8"