Commit b5b2b70f authored by Jun Siang Cheah's avatar Jun Siang Cheah
Browse files

fix: bad payload refactor

parent 7f74426a
...@@ -443,7 +443,10 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)): ...@@ -443,7 +443,10 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
try: try:
session = aiohttp.ClientSession() session = aiohttp.ClientSession()
r = await session.request( 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() r.raise_for_status()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment