From 055a37388553ef870ff6292db460daeb46145e99 Mon Sep 17 00:00:00 2001 From: brent s Date: Fri, 6 Oct 2017 15:11:46 -0400 Subject: [PATCH] oops. IPv6 encapsulation of IPv4... --- net/addr/app/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/addr/app/views.py b/net/addr/app/views.py index 466f6c4..858ae63 100644 --- a/net/addr/app/views.py +++ b/net/addr/app/views.py @@ -43,7 +43,7 @@ def index(): 'language': request.user_agent.language, 'to_header': request.user_agent.to_header(), 'version': request.user_agent.version}, - 'ip': request.remote_addr, + 'ip': re.sub('^::ffff:', '', request.remote_addr), 'headers': dict(request.headers)} # We have to convert these to strings so we can do tuple comparisons on lower()s. params = {'json': str(request.args.get('json')).lower(),