刷新404

This commit is contained in:
admin
2026-05-14 15:07:01 +08:00
parent 33f61c9f1d
commit 1b41b093a8
3 changed files with 7 additions and 3 deletions
+1
View File
@@ -0,0 +1 @@
3492623
+1
View File
@@ -0,0 +1 @@
3492666
+5 -3
View File
@@ -99,9 +99,11 @@ from starlette.responses import Response
routes = [ routes = [
WebSocketRoute("/ws/{path:path}", vnc_websocket, name="vnc"), WebSocketRoute("/ws/{path:path}", vnc_websocket, name="vnc"),
Route("/api/{path:path}", proxy_api), Route("/api/{path:path}", proxy_api, methods=["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]),
Route("/api", proxy_api), Route("/api", proxy_api, methods=["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]),
Mount("/", StaticFiles(directory=DIST_DIR, html=True), name="static"), Mount("/assets", StaticFiles(directory=os.path.join(DIST_DIR, "assets")), name="static-assets"),
Route("/{path:path}", serve_spa),
Route("/", serve_spa),
] ]
app = Starlette(routes=routes) app = Starlette(routes=routes)