Debug-Logging für IP-Adressen hinzugefügt
This commit is contained in:
3
app.py
3
app.py
@@ -89,6 +89,9 @@ def index():
|
|||||||
if not session.get('logged_in'):
|
if not session.get('logged_in'):
|
||||||
return redirect(url_for('login'))
|
return redirect(url_for('login'))
|
||||||
allowed_ip_ranges = os.getenv('ALLOWED_IP_RANGES', '')
|
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)
|
return render_template('index.html', allowed_ip_ranges=allowed_ip_ranges)
|
||||||
|
|
||||||
@app.route('/search')
|
@app.route('/search')
|
||||||
|
Reference in New Issue
Block a user