Skip to content

Commit

Permalink
fix: (log) non real ip when use proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
helloplhm-qwq authored Jan 14, 2024
1 parent 46fb398 commit 863529f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async def handle_request(request):
resp = handleResult(resp)
elif (not isinstance(resp, Response)):
resp = Response(body = str(resp), content_type='text/plain', status = 200)
aiologger.info(f'{request.remote_addr + "" if (request.remote == request.remote_addr) else f"|proxy@{request.remote}"} - {request.method} "{request.path}", {resp.status}')
aiologger.info(f'{request.remote_addr + ("" if (request.remote == request.remote_addr) else f"|proxy@{request.remote}")} - {request.method} "{request.path}", {resp.status}')
return resp
except:
logger.error(traceback.format_exc())
Expand Down

0 comments on commit 863529f

Please sign in to comment.