From 1b2f1d77f01da2efd19f4ed5a85726998dba2113 Mon Sep 17 00:00:00 2001 From: Burathar Date: Wed, 16 Dec 2020 14:01:35 +0100 Subject: [PATCH] Add client ip to resolve_hash --- app/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index 0533052..d0f7bdc 100644 --- a/app/routes.py +++ b/app/routes.py @@ -72,5 +72,5 @@ def resolve_hash(hash): db.session.commit() countermessage = "" if url.view_counter is None else f". View counter was lowered to {url.view_counter}" - app.logger.info(f"{request.environ['REMOTE_ADDR']} requested hash '{url.hash}' which resolved to '{url.url}'{countermessage}") + app.logger.info(f"{request.environ['HTTP_X_FORWARDED_FOR']} requested hash '{url.hash}' which resolved to '{url.url}'{countermessage}") return redirect(url.url, 301)