File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -40,19 +40,21 @@ def health() -> str:
4040 return "ok"
4141
4242
43- @app .get ("/" )
44- def index () -> HTMLResponse :
45- with open (WEB_DIRECTORY / "client/dist/index.html" , "r" , encoding = "utf-8" ) as f :
46- return HTMLResponse (f .read ())
47-
48-
4943app .mount (
5044 "/assets" ,
5145 StaticFiles (directory = WEB_DIRECTORY / "client/dist/assets" , check_dir = False ),
5246 name = "assets" ,
5347)
48+
49+
5450app .mount (
5551 "/favicons" ,
5652 StaticFiles (directory = WEB_DIRECTORY / "client/dist/favicons" , check_dir = False ),
5753 name = "favicons" ,
5854)
55+
56+
57+ @app .get ("/{full_path:path}" )
58+ async def index (full_path : str = "" ) -> HTMLResponse :
59+ with open (WEB_DIRECTORY / "client/dist/index.html" , "r" , encoding = "utf-8" ) as f :
60+ return HTMLResponse (f .read ())
You can’t perform that action at this time.
0 commit comments