ci: merge main to release (#8156)

This commit is contained in:
Robert Sparks 2024-11-04 16:48:12 +00:00 committed by GitHub
commit 37bbcc0be7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,3 +47,18 @@ logconfig_dict = {
}
}
}
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})")