diff --git a/contextualise.py b/contextualise.py index e00cfd8..4c81eec 100644 --- a/contextualise.py +++ b/contextualise.py @@ -217,6 +217,10 @@ def get_file(): else: userip = request.environ['HTTP_X_FORWARDED_FOR'] # if behind a proxy + # Proxy might add multiple ips, take only one: + if ',' in userip: + userip = userip.split(',')[0] + # CALCULATION OF INITIAL TIME BEFORE FIRST CLICK if len(timelist) and not (timelist[0] is None): thetime = timelist[0]