HTTP_X_FORWARDED_FOR support.

This commit is contained in:
Stefan Midjich 2016-04-17 00:22:13 +02:00
parent c95ee14de9
commit 4f0719ffe0

View file

@ -25,7 +25,10 @@ def run(arg):
l.addHandler(logHandler) l.addHandler(logHandler)
l.setLevel(DEBUG) l.setLevel(DEBUG)
client_ip = environ.get('REMOTE_ADDR') client_ip = environ.get(
'HTTP_X_FORWARDED_FOR',
environ.get('REMOTE_ADDR')
)
client_mac = None client_mac = None
error_msg = None error_msg = None
iptables_failed = False iptables_failed = False