From 40196fa28f1fe50fdf4c297c9f8987605c2d5479 Mon Sep 17 00:00:00 2001 From: elpatron Date: Tue, 18 Mar 2025 12:26:46 +0100 Subject: [PATCH] =?UTF-8?q?Debug-Logging=20f=C3=BCr=20IP-Adressen=20hinzug?= =?UTF-8?q?ef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.py b/app.py index 141156b..0ddefff 100644 --- a/app.py +++ b/app.py @@ -89,6 +89,9 @@ def index(): if not session.get('logged_in'): return redirect(url_for('login')) allowed_ip_ranges = os.getenv('ALLOWED_IP_RANGES', '') + client_ip = request.headers.get('X-Forwarded-For', request.remote_addr) + logger.info(f"Client-IP: {client_ip}") + logger.info(f"Erlaubte IP-Bereiche: {allowed_ip_ranges}") return render_template('index.html', allowed_ip_ranges=allowed_ip_ranges) @app.route('/search')