fixed logging
This commit is contained in:
parent
02920c122f
commit
74109c8cbf
@ -37,6 +37,7 @@ HOP_BY_HOP_HEADERS = {
|
||||
|
||||
async def call_official(request: Request, path: str) -> httpx.Response:
|
||||
"""Forward the incoming request to the official API and return the response."""
|
||||
print(f"Processing request to {str(request.url)}")
|
||||
|
||||
# Copy request body
|
||||
body = await request.body()
|
||||
@ -54,7 +55,7 @@ async def call_official(request: Request, path: str) -> httpx.Response:
|
||||
# Forward request upstream
|
||||
upstream_response = await official_client.request(
|
||||
method=request.method,
|
||||
url=f"{str(request.base_url).rstrip('/').replace("http://", "https://")}/{path}", # f"{OFFICIAL_API}/{path}",
|
||||
url=f"{str(request.base_url).rstrip('/').replace("http://", "https://")}/{path}",
|
||||
headers=req_headers,
|
||||
content=body,
|
||||
params=request.query_params,
|
||||
|
Loading…
x
Reference in New Issue
Block a user