shenchucheng
commited on
Commit
·
1819680
1
Parent(s):
5d18914
rm RedirectResponse
Browse files
app.py
CHANGED
|
@@ -252,14 +252,6 @@ app.add_api_route(
|
|
| 252 |
)
|
| 253 |
|
| 254 |
|
| 255 |
-
@app.get("/{catch_all:path}")
|
| 256 |
-
async def catch_all(request: Request):
|
| 257 |
-
if request.url.path.startswith("/api"):
|
| 258 |
-
raise HTTPException(status_code=404)
|
| 259 |
-
|
| 260 |
-
return RedirectResponse(url="/index.html")
|
| 261 |
-
|
| 262 |
-
|
| 263 |
app.mount(
|
| 264 |
"/",
|
| 265 |
StaticFiles(directory="./static/", html=True),
|
|
|
|
| 252 |
)
|
| 253 |
|
| 254 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
app.mount(
|
| 256 |
"/",
|
| 257 |
StaticFiles(directory="./static/", html=True),
|