Reduce re.match to official name only
This commit is contained in:
parent
243e10d809
commit
32ac399c7f
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ class IndexView(TemplateView):
|
||||||
back_to_url = self.request.GET["back_to"]
|
back_to_url = self.request.GET["back_to"]
|
||||||
elif 'HTTP_HOST' in self.request.META:
|
elif 'HTTP_HOST' in self.request.META:
|
||||||
# Exclude ourselves
|
# 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'])
|
back_to_url = "http://{}".format(self.request.META['HTTP_HOST'])
|
||||||
context['back_to_url'] = back_to_url
|
context['back_to_url'] = back_to_url
|
||||||
if back_to_url != "":
|
if back_to_url != "":
|
||||||
|
|
Loading…
Reference in a new issue