fix: bad payload refactor

This commit is contained in:
Jun Siang Cheah 2024-06-02 19:40:18 +01:00
parent 7f74426a22
commit b5b2b70f4a

View File

@ -443,7 +443,10 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
try:
session = aiohttp.ClientSession()
r = await session.request(
method=request.method, url=target_url, data=payload, headers=headers
method=request.method,
url=target_url,
data=payload if payload else body,
headers=headers,
)
r.raise_for_status()