From ce1d4f2394d8863b202d9a697a55ec2c3f0ad564 Mon Sep 17 00:00:00 2001 From: Burathar Date: Wed, 16 Dec 2020 13:58:42 +0100 Subject: [PATCH] Add remote adress --- app/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index 7b3f1b2..c166768 100644 --- a/app/routes.py +++ b/app/routes.py @@ -32,7 +32,7 @@ def index(): db.session.add(url) db.session.commit() death = None if url.death is None else url.death.strftime('%Y-%m-%d %H:%M:%S') - app.logger.info(f"{request.environ['REMOTE_ADDR']} created hash '{url.hash}' for '{url.url}'. Death: {death}, View Counter: {url.view_counter}") + app.logger.info(f"{request.environ['HTTP_X_FORWARDED_FOR'} created hash '{url.hash}' for '{url.url}'. Death: {death}, View Counter: {url.view_counter}") link = url_for("resolve_hash", hash=hash, _external = True) flash(Markup(f'Your url is shortend to {link}')) return redirect(url_for('index'))