mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Also log the forwarding host for forwarded requests
This commit is contained in:
parent
c104da28ce
commit
69d39b47ca
1 changed files with 2 additions and 1 deletions
|
@ -313,7 +313,8 @@ class Application:
|
||||||
if environ.get("REMOTE_HOST"):
|
if environ.get("REMOTE_HOST"):
|
||||||
remote_host = environ["REMOTE_HOST"]
|
remote_host = environ["REMOTE_HOST"]
|
||||||
if environ.get("HTTP_X_FORWARDED_FOR"):
|
if environ.get("HTTP_X_FORWARDED_FOR"):
|
||||||
remote_host = environ["HTTP_X_FORWARDED_FOR"]
|
remote_host = "%s (forwarded by %s)" % (
|
||||||
|
environ["HTTP_X_FORWARDED_FOR"], remote_host)
|
||||||
remote_useragent = "UNKNOWN"
|
remote_useragent = "UNKNOWN"
|
||||||
if environ.get("HTTP_USER_AGENT"):
|
if environ.get("HTTP_USER_AGENT"):
|
||||||
remote_useragent = environ["HTTP_USER_AGENT"]
|
remote_useragent = environ["HTTP_USER_AGENT"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue