Skip to content

Commit

Permalink
ci: merge main to release (#8156)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjsparks authored Nov 4, 2024
2 parents 39ea21e + d530e9a commit 37bbcc0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dev/build/gunicorn.conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,18 @@
}
}
}

def pre_request(worker, req):
client_ip = "-"
cf_ray = "-"
for (header, value) in req.headers:
header = header.lower()
if header == "cf-connecting-ip":
client_ip = value
elif header == "cf-ray":
cf_ray = value
if req.query:
path = f"{req.path}?{req.query}"
else:
path = req.path
worker.log.info(f"gunicorn starting to process {req.method} {path} (client_ip={client_ip}, cf_ray={cf_ray})")

0 comments on commit 37bbcc0

Please sign in to comment.