Browse Source

Fix double ip in generated score

master
Ruben van de Ven 5 years ago
parent
commit
35cb77c398
  1. 4
      contextualise.py

4
contextualise.py

@ -217,6 +217,10 @@ def get_file():
else: else:
userip = request.environ['HTTP_X_FORWARDED_FOR'] # if behind a proxy 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 # CALCULATION OF INITIAL TIME BEFORE FIRST CLICK
if len(timelist) and not (timelist[0] is None): if len(timelist) and not (timelist[0] is None):
thetime = timelist[0] thetime = timelist[0]

Loading…
Cancel
Save