From 69d39b47ca1201bf26c9717fbf30b01cc6e70c4b Mon Sep 17 00:00:00 2001 From: Unrud Date: Tue, 7 Mar 2017 18:21:27 +0100 Subject: [PATCH] Also log the forwarding host for forwarded requests --- radicale/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index d8e9984..cacafcc 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -313,7 +313,8 @@ class Application: if environ.get("REMOTE_HOST"): remote_host = environ["REMOTE_HOST"] 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" if environ.get("HTTP_USER_AGENT"): remote_useragent = environ["HTTP_USER_AGENT"]