kristinazk commited on
Commit
1fc1f90
·
verified ·
1 Parent(s): 9badaa4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
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
+