From 32ac399c7fc2cc64f2701b92ed50741987ec8a3c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Feb 2019 15:11:00 +0100 Subject: [PATCH] Reduce re.match to official name only --- no_ipv4_here/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/no_ipv4_here/views.py b/no_ipv4_here/views.py index 8677c02..f8390c5 100644 --- a/no_ipv4_here/views.py +++ b/no_ipv4_here/views.py @@ -18,7 +18,7 @@ class IndexView(TemplateView): back_to_url = self.request.GET["back_to"] elif 'HTTP_HOST' in self.request.META: # Exclude ourselves - if not re.match("^(no-ipv4-here.ungleich.ch|localhost)", self.request.META['HTTP_HOST']): + if not re.match("^no-ipv4-here.ungleich.ch", self.request.META['HTTP_HOST']): back_to_url = "http://{}".format(self.request.META['HTTP_HOST']) context['back_to_url'] = back_to_url if back_to_url != "":