Skip to content

Commit c9e343e

Browse files
committed
add minio auth plugin --skip-tests
1 parent f91cee1 commit c9e343e

File tree

1 file changed

+13
-6
lines changed
  • cwm_worker_operator/minio_auth_plugin

1 file changed

+13
-6
lines changed
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
from fastapi import FastAPI, Request
1+
from fastapi import FastAPI, Request, APIRouter
22

33
app = FastAPI()
4+
router = APIRouter()
45

56

6-
@app.post("/")
7-
async def root(request: Request):
8-
body = await request.json()
9-
print(body)
10-
return {"result": True}
7+
@router.api_route("/{full_path:path}", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS", "HEAD", "PATCH", "TRACE"])
8+
async def catch_all(request: Request, full_path: str):
9+
try:
10+
body = await request.body()
11+
except:
12+
body = None
13+
print(f'method: {request.method}, path: /{full_path}, body: {body}')
14+
return {}
15+
16+
17+
app.include_router(router)

0 commit comments

Comments
 (0)