From 66e3dc11ea85174bbf925686725ed72267ed344c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Mon, 11 May 2020 15:09:52 +0200 Subject: [PATCH] Fixed IP Proxy --- server/src/uds/core/util/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/uds/core/util/request.py b/server/src/uds/core/util/request.py index 443f593c..9f0ffc4e 100644 --- a/server/src/uds/core/util/request.py +++ b/server/src/uds/core/util/request.py @@ -144,7 +144,7 @@ class GlobalRequestMiddleware: if not request.ip or behind_proxy is True: # Request.IP will be None in case of nginx & gunicorn request.ip = request.ip_proxy # Stores the ip # will raise "list out of range", leaving ip_proxy = proxy in case of no other proxy apart of nginx - request.ip_proxy = proxies[1] + request.ip_proxy = proxies[1].strip() except Exception: request.ip_proxy = request.ip