Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,3 +35,12 @@ async def enhance_img(file: UploadFile = File(...)):
|
|
| 35 |
|
| 36 |
except Exception as e:
|
| 37 |
raise HTTPException(500, detail=str(e))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
except Exception as e:
|
| 37 |
raise HTTPException(500, detail=str(e))
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
from fastapi import Request
|
| 41 |
+
|
| 42 |
+
@app.api_route("/{full_path:path}", methods=["GET","POST","PUT","DELETE","PATCH","OPTIONS"])
|
| 43 |
+
async def catch_all(full_path: str, request: Request):
|
| 44 |
+
print(f"🚨 GOT {request.method} /{full_path}", flush=True)
|
| 45 |
+
raise HTTPException(404, detail="Not Found")
|
| 46 |
+
|