Skip to content

Commit

Permalink
fixed header reading
Browse files Browse the repository at this point in the history
  • Loading branch information
Foroxon committed Dec 16, 2024
1 parent 589956c commit 21100bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/web_server/web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def server_error(request: Request, exc: HTTPException):
class LogUserIPMiddleware(BaseHTTPMiddleware):
async def dispatch(self, request, call_next):
start_time = time.time()
client_ip = request.headers["CF-Connecting-IP"]
client_ip = request.headers.get("CF-Connecting-IP", request.client.host)
client_path = request.url.path

match client_path:
Expand Down

0 comments on commit 21100bb

Please sign in to comment.