From 372dd529772af947910debc165dc48ae125f0fb8 Mon Sep 17 00:00:00 2001 From: Ivan Filippov Date: Fri, 1 Jul 2016 16:02:37 -0600 Subject: [PATCH] Fix checkip.html route not working when not behind a proxy. Fixes #62 --- app/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views.py b/app/views.py index a7e8860..5191c5e 100644 --- a/app/views.py +++ b/app/views.py @@ -658,7 +658,7 @@ def qrcode(): @app.route('/nic/checkip.html', methods=['GET', 'POST']) def dyndns_checkip(): # route covers the default ddclient 'web' setting for the checkip service - return render_template('dyndns.html', response=request.headers.get('X-Real-IP')) + return render_template('dyndns.html', response=request.environ.get('HTTP_X_REAL_IP', request.remote_addr)) @app.route('/nic/update', methods=['GET', 'POST']) @dyndns_login_required