刷新404
This commit is contained in:
+5
-3
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user